<template>
	<div>
		<el-dialog :title="wxDialogTitle" v-model="concatShow" size="large" :close-on-click-modal="false">
			<el-tabs v-model="activeName2" type="card">
				<el-tab-pane label="任务维系" name="first">
					<el-row>
						<el-col :span="15" class="rborder">
							<el-col :span="16">
								<el-form :model="concatForm" label-width="100px">
									<el-form-item label="车辆信息">
										<span>{{concatForm.vin}}</span>&nbsp;&nbsp;
										<span>{{concatForm.series}}</span>&nbsp;&nbsp;
										<span>{{concatForm.configure}}</span>
									</el-form-item>
								</el-form>
							</el-col>
							<el-col :span="8" class="rBtn">
								<el-button size="small" @click="addQuotation" v-if="carData.typePcode=='bx'">新增报价单</el-button>
								<el-button size="small" @click="closeWindow">关闭窗口</el-button>
								<el-button size="small" @click="closeConcat" v-loading.fullscreen.lock="fullscreenLoadings">关闭任务</el-button>
								<el-button size="small" :disabled="overShow" v-loading.fullscreen.lock="fullscreenLoadings" type="primary" @click="saveConcat">完 成</el-button>
							</el-col>
							<el-form ref="concatForm" :model="concatForm" :rules="concatRule" label-width="100px">
								<el-col :span="11">
									<el-form-item label="维系类别" prop="parentId">

										<el-cascader size="small" :options="wxoptions" change-on-select v-model="parentId" @change="whPTypeChange">
										</el-cascader>
									</el-form-item>
								</el-col>

								<el-col :span="11">
									<el-form-item label="维系主题" prop="title">

										<el-input size="small" v-model="concatForm.title"></el-input>
									</el-form-item>
								</el-col>

								<el-col :span="11">
									<el-form-item label="回访结果" prop="visitResult">
										<el-select size="small" v-model="concatForm.visitResult" @change="changevisitResult" clearable>
											<el-option label="回访成功" value="success">
											</el-option>
											<el-option label="回访失败" value="fail">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>

								<el-col :span="11" v-if="concatForm.visitResult =='fail'">
									<el-form-item label="失败原因" prop="failReason">
										<el-select size="small" v-model="concatForm.failReason" clearable>
											<el-option label="电话错误停机或空号" value="dhtj">
											</el-option>
											<el-option label="人员不符" value="rybf">
											</el-option>
											<el-option label="未接通" value="wjt">
											</el-option>
											<el-option label="客户拒访" value="khjf">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<div v-if="parentId[0]=='bx' ">
									<el-col :span="11" v-if="concatForm.visitResult =='success' ">
										<el-form-item label="续保意愿" prop="intentionEnter">
											<el-select size="small" v-model="concatForm.intentionEnter" @change="changeintentionEnter" clearable>
												<!-- 保险回访结查增加持续跟进 -->
												<el-option label="持续跟进" value="yes">
												</el-option>
												<!-- 保险回访结查增加持续跟进 -->
												<el-option label="战败" value="no">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>

								</div>
								<div v-if=" parentId[0]!='bx' ">
									<el-col :span="11" v-if="concatForm.visitResult =='success' ">
										<el-form-item label="有意进店" prop="intentionEnter">
											<el-select size="small" v-model="concatForm.intentionEnter" @change="changeintentionEnter" clearable>
												<el-option label="是" value="yes">
												</el-option>
												<el-option label="否" value="no">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="11" v-if="concatForm.intentionEnter =='yes'&&concatForm.visitResult =='success'">
										<el-form-item label="意向等级" prop="intentionLevel">
											<el-select size="small" v-model="concatForm.intentionLevel" clearable>
												<el-option label="里程未到" value="lcwd">
												</el-option>
												<el-option label="近期到店" value="jqdd">
												</el-option>
												<el-option label="最近太忙没时间进店" value="zjtm">
												</el-option>
												<el-option label="已预约好近期到店" value="yyyh">
												</el-option>
												<el-option label="已到店保养" value="已到店保养">
												</el-option>

											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="11" v-if="concatForm.intentionEnter =='no'&&concatForm.visitResult =='success'">
										<el-form-item label="是否已保养" prop="ismaintained">
											<el-select size="small" v-model="concatForm.ismaintained" @change="changeismaintained" clearable>
												<el-option label="是" value="yes">
												</el-option>
												<el-option label="否" value="no">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<el-col :span="11" v-if="concatForm.intentionEnter =='no'&&concatForm.visitResult =='success'">
										<el-form-item label="保养地点" prop="maintainAdress">
											<el-select size="small" v-model="concatForm.maintainAdress" clearable>
												<el-option v-for="item in  missTargetCombo " :label="item.name" :value="item.code">
												</el-option>
											</el-select>
										</el-form-item>
									</el-col>
									<!-- 保养-->
									<el-col span="24" v-if="concatForm.intentionEnter =='no'&&concatForm.visitResult =='success' && concatForm.ismaintained=='yes'">
										<el-col :span="11">
											<el-form-item label="保养日期">
												<el-date-picker size="small" v-model="concatForm.maintainTime" type="date" placeholder="选择日期">
												</el-date-picker>
											</el-form-item>
										</el-col>
										<el-col :span="11">
											<el-form-item label="保养里程(KM)">
												<el-input-number style="width:95%;" size="small" placeholder="请输入数字" v-model="concatForm.avgMaintainMile">
												</el-input-number>
											</el-form-item>
										</el-col>
									</el-col>
									<el-col :span="24">
										<el-col :span="11" v-if="concatForm.intentionEnter =='no'&&concatForm.visitResult =='success'">
											<el-form-item label="流失原因" prop="lostReason">
												<el-select size="small" v-model="concatForm.lostReason" clearable>
													<el-option label="车辆转让或报废" value="clzr">
													</el-option>
													<el-option label="人在外地没时间保养" value="rzwd">
													</el-option>
													<el-option label="过路车" value="glc">
													</el-option>
													<el-option label="车很少用" value="chsy">
													</el-option>
													<el-option label="非车主本人接听电话" value="fbr">
													</el-option>
													<el-option label="外地车" value="qdc">
													</el-option>

													<el-option label="维修质量" value="wxzl">
													</el-option>
													<el-option label="维修价格" value="wxjg">
													</el-option>
													<el-option label="维修效率" value="wxxl">
													</el-option>
													<el-option label="服务态度" value="fwtd">
													</el-option>
													<el-option label="服务环境" value="fwhj">
													</el-option>
													<el-option label="路程远" value="lcy">
													</el-option>
													<el-option label="其他" value="qt">
													</el-option>

												</el-select>
											</el-form-item>
										</el-col>
									</el-col>
								</div>

								<!-- 流失 -->
								<!--<div v-if="parentId[0]  == 'ls'">
																																																																<el-col :span="12">
																																																																	<el-form-item label="流失方向">
																																																																		<el-select size="small"
																																																																		           v-model="concatForm.missTarget"
																																																																		           placeholder="流失方向"
																																																																		           clearable>
																																																																			<el-option v-for="item in  missTargetCombo "
																																																																			           :label="item.name"
																																																																			           :value="item.code">
																																																																			</el-option>
																																																																		</el-select>
																																																																	</el-form-item>
																																																																</el-col>
																																																																<el-col :span="12">
																																																																	<el-form-item label="流失原因">
																																																																		<el-select size="small"
																																																																		           v-model="concatForm.missReason"
																																																																		           placeholder="流失原因"
																																																																		           clearable>
																																																																			<el-option v-for="item in  missReasonCombo "
																																																																			           :label="item.name"
																																																																			           :value="item.code">
																																																																			</el-option>
																																																																		</el-select>
																																																																	</el-form-item>
																																																																</el-col>
																																																																<el-col :span="12">
																																																																	<el-form-item label="回访问失败原因">
																																																																		<el-select size="small"
																																																																		           v-model="concatForm.concatFailReason"
																																																																		           placeholder="回访问失败原因"
																																																																		           clearable>
																																																																			<el-option v-for="item in  failReasonCombo "
																																																																			           :label="item.name"
																																																																			           :value="item.code">
																																																																			</el-option>
																																																																		</el-select>
																																																																	</el-form-item>
																																																																</el-col>
																																																															</div>-->

								<el-form-item label="维系动作">
									<el-col :span="24">
										<span>联系车主:{{concatForm.ownerName}} {{concatForm.carownerTel}}</span>
										<el-tooltip class="item" effect="light" content="正常拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加0拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner1"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加00拨打" placement="top" v-if="concatForm.carownerTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callOwner2"></el-button>
										</el-tooltip>
									</el-col>
									<el-col :span="24">
										<span>联系送修人:{{concatForm.sender}} {{concatForm.senderTel}}</span>

										<el-tooltip class="item" effect="light" content="正常拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加0拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink1"></el-button>
										</el-tooltip>
										<el-tooltip class="item" effect="light" content="加00拨打" placement="top" v-if="concatForm.senderTel">
											<el-button size="small" type="primary" class="iconfont icon-dianhua" v-on:click="callLink2"></el-button>
										</el-tooltip>
										<el-button size="small" type="primary" v-on:click="lookHis">查看历史</el-button>
										<el-button size="small" type="primary" @click="inputForm">手动拨号</el-button>

									</el-col>
								</el-form-item>
								<el-form-item label="内容记录" prop="content">
									<el-input size="small" type="textarea" :rows="2" v-model="concatForm.content"></el-input>
								</el-form-item>
								<el-row class="fieldSet">
									<el-col :span="12">
										<el-form-item label="新增提醒">
											<el-date-picker v-model="concatForm.expectDate" type="date" placeholder="选择提醒日期" :picker-options="pickerOptions1">
											</el-date-picker>
										</el-form-item>
									</el-col>
									<el-col :span="12">
									</el-col>
									<el-col :span="24">
										<el-form-item label="提醒内容" required>
											<el-input size="small" type="textarea" :rows="2" v-model="concatForm.expectContent"></el-input>
										</el-form-item>
									</el-col>
								</el-row>
								<el-form-item label="用户标签" v-if="tagListsShow">
									<tagLists :checkTags="concatForm.userTag" v-on:childTag="childTag" v-if="tagListsShow"></tagLists>
								</el-form-item>

							</el-form>
						</el-col>

						<el-col :span="9">
							<el-row :gutter="24">
								<el-col :span="15" v-if="handShow">
									<span>通话计时：</span>
									<el-input id="timetext" style="width: 200px;" v-model="timerData" size="small" readonly></el-input>
									<el-button size="small" type="danger" :disabled="handButtonShow" @click="hand">挂机</el-button>
								</el-col>
								<el-col :span="15" style="text-align: left;">
									<el-button size="small" type="primary" @click="dbfunction" v-if="carData.typePcode=='by'">保养计算器</el-button>
									<el-button type="primary" size="small" @click="butClick">详情</el-button>
									<el-button type="danger" size="small" @click="insuranceHelp" v-if="carData.typePcode=='bx'">求助</el-button>
								</el-col>
							</el-row>
							<el-row>
								<el-col :span="24">
									<el-card class="fit" style="height: 250px;overflow-y: scroll;">
										<div slot="header" v-for="item in work.workOrder">
											<el-tag type="primary">
												{{item.type}}
											</el-tag>
											<el-tag type="primary">
												{{item.maintain_type}}
											</el-tag>
											<el-tag type="primary">
												{{item.run_mile}}&nbsp;km
											</el-tag>
											<el-tag type="primary">
												￥{{item.real_amount}}
											</el-tag>
											<br />
											<el-tag type="primary">
												{{countTime(item.balance_date)}}
											</el-tag>
											<el-tag type="primary">
												{{item.order_num}}
											</el-tag>
											<el-tag type="primary">
												{{item.receptor}}
											</el-tag>

											<!--延保、续保标签 // 后台传值则标签显示，后台不传值则标签不显示-->
											<el-tag type="primary" v-if="item.xb">
												续保
											</el-tag>
											<el-tag type="primary" v-if="item.yb">
												延保
											</el-tag>
											<el-tag type="primary" v-if="item.continuation == '2'||item.continuation == 2">
												二连保
											</el-tag>
											<el-tag type="primary" v-if="item.continuation == '3'||item.continuation == 3">
												三连保
											</el-tag>
										</div>

										<el-row style='margin-top: 5px;'>
											<el-col :span="6" class="pag">

											</el-col>
											<el-col :span="18" class="pag">
												<strong>维修项目</strong>
											</el-col>

										</el-row>
										<el-row v-for="item in work.workItem">
											<el-col :span="6" class="pag">

											</el-col>
											<el-col :span="18" class="pag">
												{{item.item_name}}
											</el-col>

										</el-row>

									</el-card>
									<!--<el-card class="fit" style="height: 100px;">
										<div v-for="item in work.workOrder">
											<el-tag type="primary">
												{{item.type}}
											</el-tag>
											<el-tag type="primary">
												{{item.maintain_type}}
											</el-tag>
											<el-tag type="primary">
												{{item.run_mile}}&nbsp;km
											</el-tag>
											<el-tag type="primary">
												￥{{item.real_amount}}
											</el-tag>
											<br>
											<el-tag type="primary">
												{{countTime(item.balance_date)}}
											</el-tag>
											<el-tag type="primary">
												{{item.order_num}}
											</el-tag>
											<el-tag type="primary">
												{{item.order_num}}
											</el-tag>
											<el-button type="primary" size="mini" @click="butClick">详情</el-button>
										</div>
									</el-card>-->
									<br>
									<el-card class="fit" style="height: 100px;" v-if="changeprice">
										<div v-for="item in quotation">
											<el-tag type="primary" v-if="quotation[0].jqNVVUPrice&&quotation[0].iscompulsoryinsurance != '1'">
												￥{{item.jqNVVUPrice}}
												<el-badge class="mark" value="交" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].VVULPT&&quotation[0].iscompulsoryinsurance != '1'">
												￥{{item.VVULPT}}
												<el-badge class="mark" value="税" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].syPrice">
												￥{{item.syPrice}}
												<el-badge class="mark" value="商" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].insuranceStartDate">
												{{item.insuranceStartDate}}
												<el-badge class="mark" value="起" />
											</el-tag>
											<el-tag type="primary" v-if="quotation[0].insureType">
												{{item.insureType}}
											</el-tag>
											<br>
											<el-tag type="primary" v-if="quotation[0].insuranceCompanyName">
												{{item.insuranceCompanyName}}
											</el-tag>
											<el-button class="rBtn" type="primary" size="mini" @click="getMoreQuotation" v-if="carData.typePcode=='bx'&&quotation[0].status != '2'">更多</el-button>
											<el-button class="rBtn" type="primary" size="mini" @click="editQuotation" v-if="carData.typePcode=='bx'&&quotation[0].status != '2'">修改报价单</el-button>
										</div>
									</el-card>
									<br>
									<!--<el-card class="fit" style="height: 150px;overflow-y: scroll;">
										<div slot="header">
											<span>维修项目</span>
										</div>
										<el-row v-for="item in work.workItem">
											<el-col :span="6" class="pag">

											</el-col>
											<el-col :span="18" class="pag">
												{{item.item_name}}
											</el-col>

										</el-row>

									</el-card>-->
								</el-col>
								<el-col :span="24">
									<hisConcat :vin="concatForm.vin" :change="changeHis" v-if="hisConcatShow">
									</hisConcat>
								</el-col>
							</el-row>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="新增报价单" name="second" v-if="selectStatus =='add'">
					<el-row>
						<span> 上一次投保起始日期为：</span>&nbsp;&nbsp; {{PstartDate}}&nbsp;&nbsp;————&nbsp;&nbsp; {{PstopDate}}
						<span> 保险公司：</span>{{bxcompany}}
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">上次投保起始日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 100%;" disabled v-model="PstartDate" format="yyyy-MM-dd" placeholder="开始时间">
							</el-date-picker>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">上次投保结束日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 100%;" disabled v-model="PstopDate" format="yyyy-MM-dd" placeholder="结束时间">
							</el-date-picker>
						</el-col>-->
					</el-row>
					<el-row :gutter="24">
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">投保起始日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 100%;" v-model="insuranceStartDate" format="yyyy-MM-dd" placeholder="">
							</el-date-picker>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">保险公司:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" v-model="insuranceCompanyId" @change="getTemplateShow" placeholder="">
								<el-option v-for="item in companyCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24">
							<el-card class="box-carda">
								<el-form :model="infoData" ref="comForm" :rules="Rule" label-width="150px">
									<el-col :span="6">
										<el-form-item label="被保险人：" prop="insured">
											<el-input size="small" v-model="infoData.insured">
												<el-select v-model="infoData.source" style="width: 80px;" slot="prepend">
													<el-option label="个人" value="0"></el-option>
													<el-option label="单位" value="1"></el-option>
												</el-select>
											</el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人证件号：" prop="insuredIdNumber">
											<el-input size="small" v-model="infoData.insuredIdNumber"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人地址：" prop="insuredAddress">
											<el-input size="small" v-model="infoData.insuredAddress"></el-input>
										</el-form-item>
									</el-col>
									<!--<el-col :span="6">
										<el-form-item label="邮编：" prop="postCode">
											<el-input size="small" v-model="infoData.postCode"></el-input>
										</el-form-item>
									</el-col>-->
									<el-col :span="6">
										<el-form-item label="联系人：" prop="contactName">
											<el-input size="small" v-model="infoData.contactName"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="联系电话：" prop="contactPhone">
											<el-input size="small" v-model="infoData.contactPhone"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="E_mail：" prop="email">
											<el-input size="small" v-model="infoData.email"></el-input>
										</el-form-item>
									</el-col>

									<el-col :span="6">
										<el-form-item label="车牌号：" prop="plateNum">
											<el-input size="small" v-model="infoData.plateNum" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车型：" prop="carModel">
											<el-input placeholder="请选择车型" size="small" icon="search" v-model="infoData.carModel" :on-icon-click="chooseSearchModel" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="厂牌代码：" prop="label">
											<el-input placeholder="请输入厂牌代码" size="small" v-model="infoData.label"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机号：" prop="engineNum">
											<el-input size="small" v-model="infoData.engineNum"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车架号：" prop="vin">
											<el-input size="small" v-model="infoData.vin" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机类型：" prop="carType">
											<el-input size="small" v-model="infoData.carType"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="排量/功率：" prop="power">
											<el-input size="small" v-model="infoData.power"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="载客/载重量：" prop="passengerWeight">
											<el-input size="small" v-model="infoData.passengerWeight"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="使用性质：" prop="useProperty">
											<el-input size="small" v-model="infoData.useProperty"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="行驶证车主：" prop="driverLicense">
											<el-input size="small" v-model="infoData.driverLicense"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="初次登记日期：" prop="firstRecordDate">
											<el-input size="small" v-model="infoData.firstRecordDate" placeholder="例如'2017-01-01'"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="实际价值：" prop="realValue">
											<el-input size="small" v-model="infoData.realValue"></el-input>
										</el-form-item>
									</el-col>
								</el-form>
							</el-card>
						</el-col>
					</el-row>
					<el-row>
						<div class="table-d" v-if="templateShow == '1'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										hehe 
										<!--<el-col :span="8" style="text-align: left;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="16" style="text-align: right;">
											<b>交强险折扣</b>
											<el-input size="small" :maxlength="200" v-model="TXMsg.paramQuotation.coupulsoryDiscount" readonly>
												<template slot="append">%</template>
											</el-input>
											<b>商业险折扣</b>
											<el-input size="small" :maxlength="200" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount" readonly>
												<template slot="append">%</template>
											</el-input>
										</el-col>-->
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:5%;text-align: center;background-color: #55C0F1;color: #333333;"><b>是否 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>不计免赔保费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[2].starts" @change="startChange('2')">车辆损失险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[3].starts" @change="startChange('3')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[3].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChange('1')">交强险</el-checkbox>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChange('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" @change="quotaChange('4')" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[5].starts" @change="startChange('5')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[5].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChange('0')">车船使用税</el-checkbox>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChange('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td style="text-align: center;">
										<el-checkbox v-model="intem[7].starts" @change="startChange('7')"></el-checkbox>
									</td>
									<td><input v-model="intem[7].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChange('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" v-on:blur="quotaChange('8')" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[10].starts" @change="startChange('10')"></el-checkbox>
									</td>
									<td><input v-model="intem[10].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChange('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChange('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" v-on:blur="quotaChange('9')" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[11].starts" @change="startChange('11')"></el-checkbox>
									</td>
									<td><input v-model="intem[11].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChange('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChange('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[13].starts" @change="startChange('13')"></el-checkbox>
									</td>
									<td><input v-model="intem[13].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChange('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChange('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChange('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChange('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChange('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChange('14')">自燃损失险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[15].starts" @change="startChange('15')"></el-checkbox>
									</td>
									<td><input v-model="intem[15].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[16].starts" @change="startChange('16')">发动机涉水险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[17].starts" @change="startChange('17')"></el-checkbox>
									</td>
									<td style="border-bottom-right-radius: 2px;"><input v-model="intem[17].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChange('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[27].starts" @change="startChange('27')"></el-checkbox>
									</td>
									<td><input v-model="intem[27].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
						<div class="table-d" v-if="templateShow == '0'||templateShow == '2'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7">
										hehe 
										<!--<el-col :span="8" style="text-align: left;">
											<b>保险报价单  </b>
										</el-col>
										<el-col :span="16" style="text-align: right;">
											<b>交强险折扣</b>
											<el-input size="small" :maxlength="200" v-model="TXMsg.paramQuotation.coupulsoryDiscount" readonly>
												<template slot="append">%</template>
											</el-input>
											<b>商业险折扣</b>
											<el-input size="small" :maxlength="200" v-model="TXMsg.paramQuotation.commercialinsuranceDiscount" readonly>
												<template slot="append">%</template>
											</el-input>
										</el-col>-->
									</td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
									</td>

									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChangeTwo('0')">车船使用税</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<td rowspan="1">
									<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
								</td>
								<td></td>
								<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
								<td>
									<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
								</td>

								<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr v-if="templateShow != '2'">
									<td>
										<el-checkbox v-model="intem[25].starts" @change="startChangeTwo('25')">不计免赔</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[25].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
					</el-row>
					<el-row :gutter="24">
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">交强险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{jqxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">车船税价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{ccsjg}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">商业险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{syxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">合计:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{sum}}￥</strong>
						</el-col>
						<br><br>
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">交强险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{jqxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">车船税价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{ccsjg}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">商业险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{syxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">合计:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{sum}}￥</span>
						</el-col>-->
					</el-row>
					<el-row :gutter="24">
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button v-on:click='comFormShowsClose'>关闭窗口</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='qqClick'>报价请求单</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='xyClick'>生成短信模板</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsSure'>保存</el-button>
						</el-col>
					</el-row>
				</el-tab-pane>
				<el-tab-pane label="修改报价单" name="third" v-if="selectStatus =='edit'">
					<el-row>
						<span> 上一次投保起始日期为：</span>&nbsp;&nbsp; {{PstartDate}}&nbsp;&nbsp;————&nbsp;&nbsp; {{PstopDate}}
						<span> 保险公司：</span>{{bxcompany}}
					</el-row>
					<el-row :gutter="24">
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">投保起始日:</p>
						</el-col>
						<el-col :span="4">
							<el-date-picker size="small" style="width: 100%;" v-model="insuranceStartDate" format="yyyy-MM-dd" placeholder="">
							</el-date-picker>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">保险公司:</p>
						</el-col>
						<el-col :span="4">
							<el-select size="small" v-model="insuranceCompanyId" disabled @change="getTemplateShow" placeholder="">
								<el-option v-for="item in companyCombo" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="24">
							<el-card class="box-carda">
								<el-form :model="infoData" ref="comForm" :rules="Rule" label-width="150px">
									<el-col :span="6">
										<el-form-item label="被保险人：" prop="insured">
											<el-input size="small" v-model="infoData.insured">
												<el-select v-model="infoData.source" style="width: 80px;" slot="prepend">
													<el-option label="个人" value="0"></el-option>
													<el-option label="单位" value="1"></el-option>
												</el-select>
											</el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人证件号：" prop="insuredIdNumber">
											<el-input size="small" v-model="infoData.insuredIdNumber"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="被保险人地址：" prop="insuredAddress">
											<el-input size="small" v-model="infoData.insuredAddress"></el-input>
										</el-form-item>
									</el-col>
									<!--<el-col :span="6">
										<el-form-item label="邮编：" prop="postCode">
											<el-input size="small" v-model="infoData.postCode"></el-input>
										</el-form-item>
									</el-col>-->
									<el-col :span="6">
										<el-form-item label="联系人：" prop="contactName">
											<el-input size="small" v-model="infoData.contactName"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="联系电话：" prop="contactPhone">
											<el-input size="small" v-model="infoData.contactPhone"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="E_mail：" prop="email">
											<el-input size="small" v-model="infoData.email"></el-input>
										</el-form-item>
									</el-col>

									<el-col :span="6">
										<el-form-item label="车牌号：" prop="plateNum">
											<el-input size="small" v-model="infoData.plateNum" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车型：" prop="carModel">
											<el-input placeholder="请选择车型" size="small" icon="search" v-model="infoData.carModel" :on-icon-click="chooseSearchModel" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="厂牌代码：" prop="label">
											<el-input placeholder="请输入厂牌代码" size="small" v-model="infoData.label"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机号：" prop="engineNum">
											<el-input size="small" v-model="infoData.engineNum"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="车架号：" prop="vin">
											<el-input size="small" v-model="infoData.vin" readonly></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="发动机类型：" prop="carType">
											<el-input size="small" v-model="infoData.carType"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="排量/功率：" prop="power">
											<el-input size="small" v-model="infoData.power"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="载客/载重量：" prop="passengerWeight">
											<el-input size="small" v-model="infoData.passengerWeight"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="使用性质：" prop="useProperty">
											<el-input size="small" v-model="infoData.useProperty"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="行驶证车主：" prop="driverLicense">
											<el-input size="small" v-model="infoData.driverLicense"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="初次登记日期：" prop="firstRecordDate">
											<el-input size="small" v-model="infoData.firstRecordDate" placeholder="例如'2017-01-01'"></el-input>
										</el-form-item>
									</el-col>
									<el-col :span="6">
										<el-form-item label="实际价值：" prop="realValue">
											<el-input size="small" v-model="infoData.realValue"></el-input>
										</el-form-item>
									</el-col>
								</el-form>
							</el-card>
						</el-col>
					</el-row>
					<el-row>
						<div class="table-d" v-if="templateShow == '1'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7"><b style="text-align: center;">保险报价单  </b></td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:5%;text-align: center;background-color: #55C0F1;color: #333333;"><b>是否 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>不计免赔保费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[2].starts" @change="startChange('2')">车辆损失险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[3].starts" @change="startChange('3')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[3].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChange('1')">交强险</el-checkbox>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChange('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" @change="quotaChange('4')" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
									<td rowspan="1" style="text-align: center;">
										<el-checkbox v-model="intem[5].starts" @change="startChange('5')"></el-checkbox>
									</td>
									<td rowspan="1"><input v-model="intem[5].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChange('0')">车船使用税</el-checkbox>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChange('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td style="text-align: center;">
										<el-checkbox v-model="intem[7].starts" @change="startChange('7')"></el-checkbox>
									</td>
									<td><input v-model="intem[7].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChange('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" v-on:blur="quotaChange('8')" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[10].starts" @change="startChange('10')"></el-checkbox>
									</td>
									<td><input v-model="intem[10].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChange('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChange('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" v-on:blur="quotaChange('9')" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[11].starts" @change="startChange('11')"></el-checkbox>
									</td>
									<td><input v-model="intem[11].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChange('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChange('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[13].starts" @change="startChange('13')"></el-checkbox>
									</td>
									<td><input v-model="intem[13].price" class='table_input' v-on:blur="sumPrice"></td>
									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChange('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChange('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChange('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChange('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChange('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>

									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChange('14')">自燃损失险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[15].starts" @change="startChange('15')"></el-checkbox>
									</td>
									<td><input v-model="intem[15].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[16].starts" @change="startChange('16')">发动机涉水险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[17].starts" @change="startChange('17')"></el-checkbox>
									</td>
									<td style="border-bottom-right-radius: 2px;"><input v-model="intem[17].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChange('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
									<td style="text-align: center;">
										<el-checkbox v-model="intem[27].starts" @change="startChange('27')"></el-checkbox>
									</td>
									<td><input v-model="intem[27].price" class='table_input' v-on:blur="sumPrice"></td>
									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
						<div class="table-d" v-if="templateShow == '0'||templateShow == '2'">
							<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
								<tr>
									<td colspan="7"><b style="text-align: center;">保险报价单  </b></td>
								</tr>
								<tr>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
									<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
									<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
									<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
									</td>
									<td>
										<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
									</td>

									<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[0].starts" style="color: red;" @change="startChangeTwo('0')">车船使用税</el-checkbox>
									</td>
									<td>
									</td>
									<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
									</td>

									<td>
										<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
									</td>
									<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<td rowspan="1">
									<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
								</td>
								<td></td>
								<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
								<td>
									<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
								</td>

								<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
									</td>
									<td rowspan="1">
										<el-select v-model="intem[4].limit" size="small">
											<el-option label="5万" value="50000"></el-option>
											<el-option label="10万" value="100000"></el-option>
											<el-option label="15万" value="150000"></el-option>
											<el-option label="20万" value="200000"></el-option>
											<el-option label="30万" value="300000"></el-option>
											<el-option label="50万" value="500000"></el-option>
											<el-option label="100万" value="1000000"></el-option>
											<el-option label="150万" value="1500000"></el-option>
											<el-option label="200万" value="2000000"></el-option>
										</el-select>
									</td>
									<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
									</td>
									<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
									</td>

									<td>
										<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
									</td>
									<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
									</td>
									<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
									</td>
									<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
									</td>
									<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
									</td>
									<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
									<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>

									<td>
										<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
									</td>
									<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td rowspan="1">
										<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
									</td>
									<td></td>
									<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr v-if="templateShow != '2'">
									<td>
										<el-checkbox v-model="intem[25].starts" @change="startChangeTwo('25')">不计免赔</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[25].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
								<tr>
									<td>
										<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
									</td>
									<td></td>
									<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>

									<td></td>
									<td></td>
								</tr>
							</table>
						</div>
					</el-row>
					<el-row :gutter="24">
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">交强险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{jqxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">车船税价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{ccsjg}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">商业险价格:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{syxbj}}￥</strong>
						</el-col>
						<el-col :span="3">
							<strong style="font-size: 15px;padding-top: 0px;">合计:</strong>
						</el-col>
						<el-col :span="2">
							<strong style="font-size: 15px;padding-top: 0px;">{{sum}}￥</strong>
						</el-col>
						<br><br>
						<!--<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">交强险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{jqxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">车船税价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{ccsjg}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">商业险价格:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{syxbj}}￥</span>
						</el-col>
						<el-col :span="2" style="margin-right:10px;">
							<p class="queryLabel">合计:</p>
						</el-col>
						<el-col :span="3" style="padding-top: 5px;">
							<span>{{sum}}￥</span>
						</el-col>-->
					</el-row>
					<el-row :gutter="24">
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsClose'>关闭窗口</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='qqClick'>报价请求单</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='xyClick'>生成短信模板</el-button>
						</el-col>
						<el-col :span="6" style="padding-left: 0px;text-align: center">
							<el-button type="primary" v-on:click='comFormShowsSure'>保存</el-button>
						</el-col>
					</el-row>
				</el-tab-pane>
			</el-tabs>
		</el-dialog>
		<!--查询客户资料弹出窗结束-->
		<el-dialog title="请输入手机号" v-model="callFormShow" size="tiny">
			<el-form label-width="70px">
				<el-col :span="24">
					<el-form-item label="手机号:">
						<el-input size="small" placeholder="请输入手机号" v-model="telephoneInput">
						</el-input>
					</el-form-item>
				</el-col>
			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="callInput" class="iconfont icon-dianhua"> 拨 打</el-button>
			</div>
		</el-dialog>
		<!--
																																																													        	作者：1813180149@qq.com
																																																													        	时间：2017-04-21
																																																													        	描述：客户详情信息
																																																													       -->
		<el-dialog title="查看客户信息" v-model="customShow" size="cus">
			<customer :qType="qType" :qValue="qValue" v-if="customShow" style="width: 100%;"></customer>
		</el-dialog>
		<el-dialog title="送修人" v-model="tableShow">
			<el-table :data="tableData" border>
				<el-table-column type="index" label="序号" width="70"></el-table-column>
				<el-table-column prop="sender" label="送修人"></el-table-column>
				<el-table-column prop="senderTel" label="手机号"></el-table-column>
				<el-table-column label="操作">
					<template scope="scope">
						<el-tooltip class="item" effect="light" content="正常拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink(scope.$index)"></el-button>
						</el-tooltip>
						<el-tooltip class="item" effect="light" content="加0拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink1(scope.$index)"></el-button>
						</el-tooltip>
						<el-tooltip class="item" effect="light" content="加00拨打" placement="top">
							<el-button size="small" type="primary" class="iconfont icon-dianhua" @click.native.prevent="callHisLink2(scope.$index)"></el-button>
						</el-tooltip>
					</template>
				</el-table-column>
			</el-table>
		</el-dialog>
		<el-dialog title="首保计算器" v-model="issbtype" v-if="typeCodeS=='sb'">
			<el-row>
				<el-col :span="24">
					<el-form :model="concatForm" label-width="100px">
						<el-row>
							<el-col :span="11">
								<el-form-item label="销售日期:">
									{{calculate.dbresp.buyTime}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-form-item label="当前日期:">
									{{calculate.dbresp.nowDate}}
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="当前里程:">
									<el-input size="small" v-model="calculate.nowMile" @blur="nowMileChange"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="3">
								<el-form-item label="保养里程:">
									<el-input size="small" v-model="calculate.maintainMile"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="1">
								<el-form-item label="下次保养日期:">
									{{db.expectDate}}
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="2">
								<el-button type="primary" @click="cretedbtask">生成保养任务</el-button>
							</el-col>

						</el-row>
					</el-form>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="定保计算器" v-model="issbtype" v-else>
			<el-row>
				<el-col :span="24">
					<el-form :model="concatForm" label-width="100px">
						<el-row>
							<el-col :span="11">
								<el-form-item label="上次保养日期:">
									{{calculate.dbresp.balanceTime}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-form-item label="上次保养里程:">
									{{calculate.dbresp.runMile}}
								</el-form-item>
							</el-col>
							<el-col :span="10">
								<el-form-item label="当前里程:">
									<el-input size="small" v-model="calculate.nowMile" @blur="nowMileChange"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="3">
								<el-form-item label="保养间隔里程:">
									<el-input size="small" v-model="calculate.maintainMile"></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="11">
								<el-form-item label="下次保养日期:">
									{{db.expectDate}}
								</el-form-item>
							</el-col>
							<el-col :span="11" :offset="2">
								<el-button type="primary" @click="cretedbtask">生成定保任务</el-button>
							</el-col>

						</el-row>
					</el-form>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="选择车型" v-model="searchCarShow" size="small">
			<el-row :gutter="24">
				<el-col :span="11" style="margin-left:5px;">
				</el-col>
				<el-col :span="24" style="margin-left:5px;">
					<div style="height: 3em;"></div>
				</el-col>
				<el-col :span="24" style="margin-left:5px; height: 250px;overflow: scroll;">
					<el-tree :data="SearchTreeData" :filter-node-method="filterNode" :highlight-current=true :props="defaultProps" accordion @node-click="searchNodeClick" :auto-expand-parent=false node-key="id"></el-tree>
				</el-col>
			</el-row>

			<div slot="footer" class="dialog-footer">
				<el-button @click="searchCarShow = false">取 消</el-button>
				<el-button type="primary" @click="serchSaveCar">提 交</el-button>
			</div>
		</el-dialog>
		<el-dialog title="报价请求单" v-model="qqShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="qqFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="qqText">
								<el-input size="small" v-model="qqFromData.qqText" :autosize="{ minRows: 5,maxRows: 10}" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" v-on:click='copyQQ'>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button v-on:click='qqShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价响应单" v-model="xyShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="0px">
						<el-col :span="24">
							<el-form-item label="" prop="xyText">
								<el-input size="small" v-model="xyFromData.xyText" :autosize="{ minRows: 5,maxRows: 10}" type="textarea"></el-input>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="10" style="padding-left: 0px;text-align: right">
					<el-button type="primary" v-on:click=''>复制</el-button>
				</el-col>
				<el-col :span="8" style="padding-left: 0px;text-align: right">
					<el-button v-on:click='xyShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="价格确认" v-model="sureShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<el-form :model="xyFromData" label-width="100px">
						<el-col :span="24">
							<el-col :span="24">
								<el-form-item label="商业险价格:" prop="">
									<span>{{syxbj}} 元</span>
								</el-form-item>
							</el-col>
							<el-form-item label="交强险价格:" prop="">
								<span>{{jqxbj}} 元</span>
							</el-form-item>
						</el-col>
						<el-col :span="24">
							<el-form-item label="车船税价格:" prop="">
								<span>{{ccsjg}} 元</span>
							</el-form-item>
						</el-col>

						<el-col :span="24">
							<el-form-item label="合计:" prop="">
								<span>{{sum}} 元</span>
							</el-form-item>
						</el-col>
					</el-form>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" v-loading.fullscreen.lock="fullscreenLoading" v-on:click='saveEdit'>确认</el-button>
					<el-button v-on:click='sureShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="报价预警" v-model="yujingShow" size="tiny">
			<el-row :gutter="24">
				<el-col :span="24">
					<span>{{yujingMsg}}</span>
				</el-col>
			</el-row>
			<el-row :gutter="24">
				<el-col :span="24" style="padding-left: 0px;text-align: right;margin-bottom: 20px;">
					<el-button type="primary" v-on:click='yujingSave' v-loading.fullscreen.lock="fullscreenLoading">确认</el-button>
					<el-button v-on:click='yujingShow=false'>关闭</el-button>
				</el-col>
			</el-row>
		</el-dialog>
		<el-dialog title="提示" v-model="auditShow" size="mini">
			<div style="text-align: center;">
				<strong style="font-size: 16px;">是否载入保险项目？</strong>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button type="danger" v-on:click='auditShow = false'>不载入</el-button>
				<el-button type="primary" v-on:click='lastMessage()'>载入保险单</el-button>
				<el-button type="primary" v-on:click='lastMessage(insurance)'>载入报价单</el-button>
			</div>
		</el-dialog>
		<el-dialog title="更多报价单" v-model="moreQuotationShow">
			<el-row :gutter="24">
				<el-table :data="insPriceData" border style="align-content: center;">
					<el-table-column label="保险公司" prop="insuranceCompanyName">
					</el-table-column>
					<el-table-column label="保险类型" prop="insureType" :formatter="insureTypeCov">
					</el-table-column>
					<el-table-column label="保险起始日期" prop="insuranceStartDate">
					</el-table-column>
					<el-table-column label="交强险金额" prop="jqNVVUPrice">
					</el-table-column>
					<el-table-column label="车船税" prop="VVULPT">
					</el-table-column>
					<el-table-column label="商业险金额" prop="commercialinsuranceTotal">
					</el-table-column>
					<el-table-column label="操作" align="right" width="70px" fixed="right">
						<template scope="scope">
							<el-button type="primary" size="mini" @click.native.prevent="changePrice(scope.$index)">修改</el-button>
						</template>
					</el-table-column>
				</el-table>
			</el-row>
		</el-dialog>
	</div>
</template>

<script>
	import customer from './customer/src/customer.vue'
	import hisConcat from './hisConcat.vue'
	import tagLists from './tagList.vue'
	import moment from 'moment'
	export default {

		data: function() {
			return {
				//更多报价单界面
				moreQuotationShow: false,
				//点击任务处理按钮进来时第一条数据
				rowData1: {},
				//完成按钮
				fullscreenLoadings: false,
				int: '',
				//挂机按钮禁用状态
				handButtonShow: false,
				//完成按钮禁用状态
				overShow: false,
				//挂机按钮显示
				handShow: false,
				//通话计时
				timerData: '0时0分0秒',
				hour: 0, //时
				minute: 0, //分
				second: 0, // 秒
				millisecond: 0, //毫秒
				auditShow: false,
				//dengdaitiao
				fullscreenLoading: false,
				activeName2: 'first',
				//报价单新增
				addQotationShow: '',
				quotationShow: false,
				id: '',
				//新增还是修改报价单
				selectStatus: '',
				carData: {},
				//报价单数据开始
				//
				//
				//上次保单信息
				PstartDate: '',
				PstopDate: '',
				bxcompany: '',
				TXMsg: {
					insuranceCar: {
						insured: '',
						InsuredAddress: '',
						InsuredIdNumber: '',
						postCode: '',
						contactName: '',
						contactPhone: '',
						email: '',
						plateNum: '',
						carValue: '',
						carLevel: '',
						engineNum: '',
						vin: '',
						power: '',
						passengerWeight: '',
						useProperty: '',
						driverLicense: '',
						firstRecordDate: '',
						realValue: '',
					},
					paramQuotation: {
						carId: '',
						commercialinsuranceTotal: '',
						compulsoryTotal: '',
						contactPeople: '',
						contactPhone: '',
						insuranceCompanyId: '',
						insuranceStartDate: '',
						insureType: '',
						coupulsoryDiscount:"",//交强险折扣
						commercialinsuranceDiscount:'', //商业险折扣
					},
					itemList: [],
				},
				insureType: '',
				insuranceStartDate: '',
				insuranceCompanyId: '',
				companyCombo: [],
				yujingMsg: '',
				yujingShow: false,
				sureShow: false,
				xyShow: false,
				qqShow: false,
				changeprice: false,
				//				//报价单维护界面显示
				//				comFormShows: this.comFormShows,
				//选择车型界面显示
				searchCarShow: false,
				//搜索的车型数据
				SearchTreeData: [],
				//树型数据配置
				defaultProps: {
					children: 'child',
					label: 'label',
				},
				searhcarType: '',
				searchdatavale: '',
				searchdatalabel: '',
				searchdataNumber: '',
				insPrice: 0,
				jqxbj: "",
				ccsjg: '',
				syxbj: "",
				sum: '',
				qqFromData: {
					qqText: ""
				},
				xyFromData: {
					xyText: ""
				},
				//校验规则
				Rule: {
					insuredIdNumber: [{
						required: true,
						message: '请输入被保险人证件号',
						trigger: 'blur'
					}],
					insured: [{
						required: true,
						message: '请输入被保险人',
						trigger: 'blur'
					}],
					insuredAddress: [{
						required: true,
						message: '请输入被保险人地址',
						trigger: 'blur'
					}],
					//					postCode: [{
					//						required: true,
					//						message: '请输入邮编',
					//						trigger: 'blur'
					//					}],
					contactName: [{
						required: true,
						message: '请输入联系人',
						trigger: 'blur'
					}],
					contactPhone: [{
						required: true,
						message: '请输入联系电话',
						trigger: 'blur'
					}],
					//					email: [{
					//						required: true,
					//						message: '请输入email',
					//						trigger: 'blur'
					//					}],
					carModel: [{
						required: true,
						message: '请选择车型',
						trigger: 'blur'
					}],
					//					engineNum: [{
					//						required: true,
					//						message: '请输入发动机号',
					//						trigger: 'blur'
					//					}],
					driverLicense: [{
						required: true,
						message: '请输入行驶证车主',
						trigger: 'blur'
					}],
					firstRecordDate: [{
						required: true,
						message: '请选择初次登记日期',
						trigger: 'blur'
					}],

				},
				infoData: { //点击设置进来查出的数据
					source: '', //被保险人类型0个人1单位
					label: '',
					insured: "",
					compulsoryTotal: "",
					insuredIdNumber: "",
					carType: "",
					useProperty: "",
					commercialinsuranceTotal: "",
					driverLicense: "",
					vin: "",
					id: "",
					ower: "",
					email: "",
					passengerWeight: "",
					contactName: "",
					engineNum: "",
					updateUser: "",
					updateTime: "",
					firstRecordDate: "",
					plateNum: "",
					insuranceStopDate: "",
					carAge: "",
					realValue: "",
					companyId: "",
					createTime: "",
					createUser: "",
					postCode: "",
					insuredAddress: "",
					contactPhone: "",
					insuranceStartDate: "",
					//					carModel: "",
					carLevel: '',
					carValue: '',
				},
				intem: [{
					name: "交强险-车船使用税",
					type: 0,
					limit: "",
					price: "",
					id: 0,
					starts: false,
				}, {
					name: "交强险-保险费",
					type: 1,
					limit: "",
					price: "",
					id: 1,
					starts: false,
				}, {
					name: "车辆损失险",
					type: 1,
					limit: "",
					price: "",
					id: 2,
					starts: false,
				}, {
					name: "车辆损失险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 3,
					starts: false,
				}, {
					name: "第三者责任险",
					type: 1,
					limit: "",
					price: "",
					id: 4,
					starts: false,
				}, {
					name: "第三者责任险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 5,
					starts: false,
				}, {
					name: "盗抢险",
					type: 1,
					limit: "",
					price: "",
					id: 6,
					starts: false,
				}, {
					name: "盗抢险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 7,
					starts: false,
				}, {
					name: "车上人员责任险-司机",
					type: 1,
					limit: "",
					price: "",
					id: 8,
					starts: false,
				}, {
					name: "车上人员责任险-乘客",
					type: 1,
					limit: "",
					price: "",
					id: 9,
					starts: false,
				}, {
					name: "车上人员责任险-司机-不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 10,
					starts: false,
				}, {
					name: "车上人员责任险-乘客-不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 11,
					starts: false,
				}, {
					name: "车身划痕险",
					type: 1,
					limit: "",
					price: "",
					id: 12,
					starts: false,
				}, {
					name: "车身划痕险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 13,
					starts: false,
				}, {
					name: "自燃损失险",
					type: 1,
					limit: "",
					price: "",
					id: 14,
					starts: false,
				}, {
					name: "自燃损失险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 15,
					starts: false,
				}, {
					name: "发动机涉水险",
					type: 1,
					limit: "",
					price: "",
					id: 16,
					starts: false,
				}, {
					name: "发动机涉水险不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 17,
					starts: false,
				}, {
					name: "玻璃单独玻璃险",
					type: 0,
					limit: "",
					price: "",
					id: 18,
					starts: false,
				}, {
					name: "润华玻璃险",
					type: 0,
					limit: "",
					price: "",
					id: 19,
					starts: false,
				}, {
					name: "机动车损失保险无法找到第三方特约险",
					type: 0,
					limit: "",
					price: "",
					id: 20,
					starts: false,
				}, {
					name: "车上货物责任险",
					type: 0,
					limit: "",
					price: "",
					id: 21,
					starts: false,
				}, {
					name: "润华划痕险",
					type: 0,
					limit: "",
					price: "",
					id: 22,
					starts: false,
				}, {
					name: "续保手册",
					type: 0,
					limit: "",
					price: "",
					id: 23,
					starts: false,
				}, {
					name: "驾意险",
					type: 0,
					limit: "",
					price: "",
					id: 24,
					starts: false,
				}, {
					name: "不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 25,
					starts: false,
				}, {
					name: "新增设备险",
					type: 0,
					limit: "",
					price: "",
					id: 26,
					starts: false,
				}, {
					name: "新增设备险不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 27,
					starts: false,
				}],
				//保险项目模板显示
				templateShow: "",
				contentMsg: '',
				//
				//
				//报价单数据结束
				//FORM 表单校验规则
				concatRule: {

					parentId: [{
						required: true,
						message: '请选择维系类别',
						trigger: 'blur'
					}],
					title: [{
						required: true,
						message: '请填写维系标题',
						trigger: 'blur'
					}],

					content: [{
						required: true,
						message: '请输入内容记录',
						trigger: 'blur'
					}],
					visitResult: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					failReason: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					intentionEnter: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					intentionLevel: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					ismaintained: [{
						//required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					maintainAdress: [{
						//required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					nomaintainReason: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],
					lostReason: [{
						required: true,
						message: '请选择',
						trigger: 'blur'
					}],

				},
				tableShow: false,
				//维系历史强制刷新
				changeHis: 1,
				//维系历史显示属性
				hisConcatShow: false,
				//tag显示属性
				tagListsShow: false,
				//是首保还是定保，弹出框
				issbtype: false,
				//级联选择的值
				parentId: [],
				msgTypeCode: [],
				tableData: [],
				//首保还是定保
				typeCode: '',
				//任务小类取前两位
				typeCodeS: "",
				//定保下次保养时间
				db: {
					expectDate: null
				},
				wxoptions: [{
					value: 'zh',
					label: '综合',
					children: [{
						value: 'srhf',
						label: '三日回访',
					}]
				}, {
					value: 'by',
					label: '保养',
					children: [{
							value: 'sb',
							label: '首保'
						}, {
							value: 'sbm',
							label: '目标月首保'
						}, {
							value: 'eb',
							label: '二保'
						},
						{
							value: 'ebm',
							label: '目标月二保'
						},
						{
							value: 'db',
							label: '定保'
						}
					]
				}, {
					value: 'bx',
					label: '保险',
					children: [{
							value: 'sc',
							label: '手册'
						}, {
							value: 'xbx',
							label: '新保续'
						}, {
							value: 'xubx',
							label: '续保续'
						},
						{
							value: 'hy',
							label: '活跃'
						},
						{
							value: 'fhy',
							label: '非活跃'
						}
					]
				}, {
					value: 'ls',
					label: '流失',
					children: [{
							value: 'zls',
							label: '准流失'
						},
						{
							value: 'yls',
							label: '流失'
						}
					]
				}, {
					value: 'ga',
					label: '关爱',
					children: [{
						value: 'sr',
						label: '生日'
					}, {
						value: 'ns',
						label: '年审'
					}, {
						value: 'rc',
						label: '质保'
					}, {
						value: 'yb',
						label: '延保'
					}, {
						value: 'hd',
						label: '活动'
					}]
				}],
				/***********流失方向字典结束****************/
				/***********流失方向字典开始****************/
				missTargetCombo: [
					//			{
					//				value: 'rt',
					//				label: '润通'
					//			}, {
					//				value: 'hf',
					//				label: '鸿发'
					//			}, {
					//				value: 'jh',
					//				label: '嘉恒'
					//			}, {
					//				value: 'yz',
					//				label: '银座'
					//			}, {
					//				value: 'xlc',
					//				label: '修理厂'
					//			},
					//			{
					//				value: 'qt',
					//				label: '其它地区'
					//			}
				],
				missReasonCombo: [
					//			{
					//				value: 'wxzl',
					//				label: '维修质量'
					//			}, {
					//				value: 'wxjg',
					//				label: '维修价格'
					//			}, {
					//				value: 'wxxl',
					//				label: '维修效率'
					//			}, {
					//				value: 'fwtd',
					//				label: '服务态度'
					//			}, {
					//				value: 'fwhj',
					//				label: '服务环境'
					//			},
					//			{
					//				value: 'lcy',
					//				label: '路程远'
					//			},
					//			{
					//				value: 'qt',
					//				label: '其他'
					//			}
				],
				failReasonCombo: [
					//			{
					//				value: 'ch',
					//				label: '错号'
					//			}, {
					//				value: 'kh',
					//				label: '空号'
					//			}, {
					//				value: 'tj',
					//				label: '停机'
					//			}, {
					//				value: 'gj',
					//				label: '关机'
					//			}, {
					//				value: 'jf',
					//				label: '客户拒访'
					//			},
					//			{
					//				value: 'wrjt',
					//				label: '未接通'
					//			}   ,
					//			{
					//				value: 'rybf',
					//				label: '人员不符'
					//			} 
				],
				//最近的工单
				work: {
					workOrder: [],
					workItem: [],
					quotation: [],
				},
				quotation: [],
				//修改时保险公司
				editcompany: '',
				userTagCombo: [],
				/***********维系记录窗口****************/
				//维系窗口标题
				wxDialogTitle: '',
				//维系窗口显示
				concatShow: this.show,
				//定保计算器
				calculate: {
					vin: '',
					//typeCode
					//任务小类
					typeCode: '',

					//默认保养里程
					nowMile: '',
					//返回值
					dbresp: {},
					//当前里程
					maintainMile: '5000',
				},
				//维系表单
				concatForm: {
					visitResult: '',
					failReason: '',
					intentionEnter: '',
					intentionLevel: '',
					ismaintained: '',
					maintainAdress: '',
					nomaintainReason: '',
					lostReason: '',
					recordPath: '', //录音路径
					recordLength: '', //录音长度
					taskId: [], //任务 ID
					companyId: '',
					plateNum: '',
					vin: '',
					series: '', //车型名称
					configure: '', //车型中文名称
					title: '', //维护主题
					parentId: '', //维系大类
					typeId: '', //维系小类
					//联系车主
					ownerName: '', //车主
					ownerPhone: '', //车主电话
					carownerTel: '',
					//
					sender: '', //送修人
					senderTel: '', //送修人电话
					maintainTime: null, //保养日期
					avgMaintainMile: '', //保养里程
					missReason: '',
					missTarget: '',
					concatFailReason: '',
					carId: '',
					content: '',
					//新建任务
					type: '',
					expectDate: null,
					expectContent: '',
					//用户标签
					userTag: []
				},
				emptyConcatForm: {
					visitResult: '',
					failReason: '',
					intentionEnter: '',
					intentionLevel: '',
					ismaintained: '',
					maintainAdress: '',
					nomaintainReason: '',
					lostReason: '',
					recordPath: '', //录音路径
					recordLength: '', //录音长度
					configure: '', //车型中文名称
					taskId: [], //任务 ID
					companyId: '', //分司ID
					plateNum: '', //车牌号
					vin: '', //车架号
					series: '', //车型名称
					title: '', //维护主题
					carId: '',
					parentId: '', //维系大类
					typeId: '', //维系小类
					//联系车主
					ownerName: '', //车主
					ownerPhone: '', //车主电话
					carownerTel: '',
					sender: '', //送修人
					senderTel: '', //送修人电话

					maintainTime: null, //保养日期
					avgMaintainMile: '', //保养里程
					missReason: '',
					missTarget: '',
					concatFailReason: '',
					content: '',
					type: '',
					//新建任务
					expectDate: '',
					expectContent: '',
					//用户标签
					userTag: []

				},
				//历史维系表单
				hisConcatGrid: [],
				pickerOptions1: {
					shortcuts: [{
						text: '一天后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24);
							picker.$emit('pick', date);
						}
					}, {
						text: '两天后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 2);
							picker.$emit('pick', date);
						}
					}, {
						text: '三天后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 3);
							picker.$emit('pick', date);
						}
					}, {
						text: '四天后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 4);
							picker.$emit('pick', date);
						}
					}, {
						text: '一周后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
							picker.$emit('pick', date);
						}
					}, {
						text: '两周后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 14);
							picker.$emit('pick', date);
						}
					}, {
						text: '二十天后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 20);
							picker.$emit('pick', date);
						}
					}, {
						text: '一个月后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
							picker.$emit('pick', date);
						}
					}, {
						text: '两月后',
						onClick(picker) {
							const date = new Date();
							date.setTime(date.getTime() + 3600 * 1000 * 24 * 60);
							picker.$emit('pick', date);
						}
					}]
				},
				telephoneInput: '',
				callFormShow: false,
				qType: "",
				qValue: "",
				customShow: false,
				//录音开始
				startDate: '',
				//录音结束
				stopDate: '',
				//更多报价单
				insPriceData: [],
			}
		},
		props: {
			show: false,
			rowData: null,
			//vin
			vin: "",
			//车牌号

			//任务标题
			checkTags: "",
		},
		watch: {
			rowData: function(row) {
				debugger;
				this.$data.changeHis = this.$data.changeHis + 1;
				if(row instanceof Array) {
					this.$data.emptyConcatForm.taskId = [];
					for(var i = 0; i < row.length; i++) {
						this.$data.emptyConcatForm.taskId.push(row[i].id);
					}
				} else {
					this.$data.emptyConcatForm.taskId = row.id;
				}
				//初始化挂机相关数据
				//挂机按钮禁用状态
				this.$data.handButtonShow = false;
				//完成按钮禁用状态
				this.$data.overShow = false;
				//挂机按钮显示
				this.$data.handShow = false; //通话计时
				this.$data.timerData = '0时0分0秒';
				this.$data.int = '';
				this.addConcat();
			},

			show: function(sh) {
				debugger;
				if(sh) {
					this.addConcat();
				}
			},
			//			rowData:function(row){
			//				debugger;
			//				this.addConcat();
			//			},
			concatShow: function() {
				this.$emit('refresh');
			}
		},
		methods: {
			//保险求助
			insuranceHelp: function() {
				this.$refs.concatForm.validate(function(valid) {
					if(valid) {
						if(this.$data.concatForm.expectDate != '' && this.$data.concatForm.expectContent == '') {
							this.$message.error("请填写提醒内容！")
						} else {
							if(this.$data.concatForm.maintainTime) {
								this.$data.concatForm.maintainTime = new Date(this.$data.concatForm.maintainTime).getTime();
							}
							if(this.$data.concatForm.expectDate) {
								this.$data.concatForm.expectDate = this.moment(this.$data.concatForm.expectDate).format("YYYY-MM-DD");
							}
							this.$confirm('确定要进行求助吗？', '提示', {
								confirmButtonText: '确定',
								cancelButtonText: '取消',
								type: 'warning'
							}).then(() => {
								this.$data.fullscreenLoadings = true;
								this.$http({
									method: 'POST',
									url: this.API_ROOT + '/crm/contact/seek/help/save',
									body: this.$data.concatForm,
								}).then(function(resp) {
									//this.queryTaskGrid();	
									debugger;
									this.$data.concatShow = false;
									this.$data.fullscreenLoadings = false;
									this.$message(resp.data.msg);
									//this.$emit('refresh');

								}, function(error) {
									// error
								})
							}).catch(() => {
								this.$message({
									type: 'info',
									message: '已取消此操作'
								});
							});
						}
					}
					return false;
				}.bind(this));

			},
			//获取保险公司模板
			getTemplateShow: function() {
				debugger;
				if(this.$data.insuranceCompanyId && this.$data.selectStatus == "add") {
					this.$data.auditShow = true;
				} else {
					this.$data.auditShow = false;
				}
				debugger;
				this.$http({
					method: 'POST',
					url: this.API_ROOT + '/insurance/info',
					params: {
						id: this.$data.insuranceCompanyId,
					}
				}).then(function(resp) {
					debugger;
					if(resp.data.success) {
						this.$data.templateShow = resp.data.data.templet;
					}
					if(this.$data.selectStatus == "add") {
						//新增报价单，换保险公司清空保险项目信息。
						for(var j = 0; j < this.$data.intem.length; j++) {
							this.$data.intem[j].starts = false;
							this.$data.intem[j].limit = "";
							this.$data.intem[j].price = "";
						};
					}

				}, resp => {

				});
			},
			//不计免赔何在一起
			startChangeTwo: function(num) {
				debugger;
				if(num == "0") {
					//车船税
					if(this.$data.intem[0].starts == true) {
						this.$data.intem[1].starts = true;
					}
					if(this.$data.intem[0].starts == false) {
						this.$data.intem[1].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "1") {
					//交强险
					if(this.$data.intem[1].starts == true) {
						this.$data.intem[0].starts = true;
					}
					if(this.$data.intem[1].starts == false) {
						this.$data.intem[0].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "8") {
					//车上人员-司机
					if(this.$data.intem[8].starts == true) {
						this.$data.intem[8].limit = "1";
					}
					if(this.$data.intem[8].starts == false) {
						this.$data.intem[8].limit = "";
						this.$data.intem[8].price = "";
					}
				} else if(num == "9") {
					//车上人员-乘客
					if(this.$data.intem[9].starts == true) {
						this.$data.intem[9].limit = "4";
					}
					if(this.$data.intem[9].starts == false) {
						this.$data.intem[9].limit = "";
						this.$data.intem[9].price = "";
					}
				} else if(this.$data.intem[num].starts == false) {
					this.$data.intem[num].limit = "";
					this.$data.intem[num].price = "";
				}
				this.sumPrice();
			},
			//不计免赔分开选择险种自动选中不计免赔
			startChange: function(num) {
				debugger;
				if(num == "0") {
					//交强险
					if(this.$data.intem[0].starts == true) {
						this.$data.intem[1].starts = true;
					}
					if(this.$data.intem[0].starts == false) {
						this.$data.intem[1].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "1") {
					if(this.$data.intem[1].starts == true) {
						this.$data.intem[0].starts = true;
					}
					if(this.$data.intem[1].starts == false) {
						this.$data.intem[0].starts = false;
						this.$data.intem[0].price = "";
						this.$data.intem[1].price = "";
					}
				} else if(num == "2") {
					//车辆损失险
					if(this.$data.intem[2].starts == true) {
						this.$data.intem[3].starts = true;
					}
					if(this.$data.intem[2].starts == false) {
						this.$data.intem[3].starts = false;
						this.$data.intem[2].price = "";
						this.$data.intem[3].price = "";
					}
				} else if(num == "4") {
					//第三者责任险
					if(this.$data.intem[4].starts == true) {
						this.$data.intem[5].starts = true;
					}
					if(this.$data.intem[4].starts == false) {
						this.$data.intem[5].starts = false;
						this.$data.intem[4].price = "";
						this.$data.intem[5].price = "";
						this.$data.intem[4].limit = "";
						this.$data.intem[5].limit = "";
					}
				} else if(num == "6") {
					//盗抢险
					if(this.$data.intem[6].starts == true) {
						this.$data.intem[7].starts = true;
					}
					if(this.$data.intem[6].starts == false) {
						this.$data.intem[7].starts = false;
						this.$data.intem[6].price = "";
						this.$data.intem[7].price = "";
					}
				} else if(num == "8") {
					//车上人员责任险-司机.司机
					if(this.$data.intem[8].starts == true) {
						this.$data.intem[10].starts = true;
						this.$data.intem[8].limit = '1';
						this.$data.intem[10].limit = '1';
					}
					if(this.$data.intem[8].starts == false) {
						this.$data.intem[10].starts = false;
						this.$data.intem[8].price = "";
						this.$data.intem[10].price = "";
						this.$data.intem[8].limit = "";
						this.$data.intem[10].limit = "";
					}
				} else if(num == "9") {
					//车上人员责任险-乘客
					if(this.$data.intem[9].starts == true) {
						this.$data.intem[11].starts = true;
						this.$data.intem[9].limit = '4';
						this.$data.intem[11].limit = '4';
					}
					if(this.$data.intem[9].starts == false) {
						this.$data.intem[11].starts = false;
						this.$data.intem[9].price = "";
						this.$data.intem[11].price = "";
						this.$data.intem[9].limit = "";
						this.$data.intem[11].limit = "";
					}
				} else if(num == "12") {
					//车身划痕险
					if(this.$data.intem[12].starts == true) {
						this.$data.intem[13].starts = true;
					}
					if(this.$data.intem[12].starts == false) {
						this.$data.intem[13].starts = false;
						this.$data.intem[12].price = "";
						this.$data.intem[13].price = "";
					}
				} else if(num == "14") {
					//自然损失险
					if(this.$data.intem[14].starts == true) {
						this.$data.intem[15].starts = true;
					}
					if(this.$data.intem[14].starts == false) {
						this.$data.intem[15].starts = false;
						this.$data.intem[14].price = "";
						this.$data.intem[15].price = "";
					}
				} else if(num == "16") {
					//发动机涉水险
					if(this.$data.intem[16].starts == true) {
						this.$data.intem[17].starts = true;
					}
					if(this.$data.intem[16].starts == false) {
						this.$data.intem[17].starts = false;
						this.$data.intem[16].price = "";
						this.$data.intem[17].price = "";
					}
				} else if(num == "26") {
					//发动机涉水险
					if(this.$data.intem[26].starts == true) {
						this.$data.intem[27].starts = true;
					}
					if(this.$data.intem[26].starts == false) {
						this.$data.intem[27].starts = false;
						this.$data.intem[26].price = "";
						this.$data.intem[27].price = "";
					}
				} else {
					if(this.$data.intem[num].starts == false) {
						this.$data.intem[num].price = "";
						this.$data.intem[num].limit = "";
					}
				}
				this.sumPrice();

			},
			//改变回访结果
			changevisitResult: function() {
				debugger;
				this.$data.concatForm.failReason = '';
				this.$data.concatForm.intentionEnter = '';
				this.$data.concatForm.intentionLevel = '';
				this.$data.concatForm.ismaintained = '';
				this.$data.concatForm.maintainAdress = '';
				this.$data.concatForm.nomaintainReason = '';
				this.$data.concatForm.lostReason = '';
			},
			//改变有意进店
			changeintentionEnter: function() {
				debugger;
				this.$data.concatForm.intentionLevel = '';
				this.$data.concatForm.ismaintained = '';
				this.$data.concatForm.maintainAdress = '';
				this.$data.concatForm.nomaintainReason = '';
				this.$data.concatForm.lostReason = '';
			},
			//改变时都已保养
			changeismaintained: function() {
				debugger;
				this.$data.concatForm.maintainAdress = '';
				this.$data.concatForm.nomaintainReason = '';
				this.$data.concatForm.lostReason = '';
			},
			//查看历史
			lookHis: function() {

				this.$http({
					method: 'GET',
					url: this.API_ROOT + '/crm/car/carPhone', //url
					params: { //发送的参数
						vin: this.$data.concatForm.vin,
					}
				}).then(function(resp) {
					debugger;
					resp.data.total = parseInt(resp.data.total);
					this.$data.tableData = resp.data.dataList;
					this.$data.tableShow = true;
				}, function(error) {
					// error
				})
			},
			//点击客户详情
			butClick: function() {
				debugger;
				this.$data.customShow = true;
				this.$data.qType = 1;
				this.$data.qValue = this.$data.concatForm.vin;
			},
			childTag: function(tag) {
				this.$data.concatForm.userTag = tag;
			},
			/**************维护状态转换****************/
			whPTypeChange: function(value) {
				debugger
				//给大类赋值
				this.$data.concatForm.parentId = value[0];
				var pTypeName = "";
				switch(value[0]) {
					case "zh":
						pTypeName = "综合";
						break
					case "by":
						pTypeName = "保养";
						break
					case "bx":
						pTypeName = "保险";
						break
					case "ls":
						pTypeName = "流失";
						break
					case "ga":
						pTypeName = "关爱";
						break
					case "zdy":
						pTypeName = "自定义";
						break
					default:
						break
				}
				//追加主题
				this.$data.concatForm.title = "[" + pTypeName + "]";
				//小类
				if(value[1] != undefined) {
					//给小类赋值
					this.$data.concatForm.typeId = value[1];
					var pTypeName = "";
					switch(value[1]) {
						case "srhf":
							pTypeName = "三日回访";
							break
						case "sb":
							pTypeName = "首保";
							break
						case "sbm":
							pTypeName = "目标月首保";
							break
						case "eb":
							pTypeName = "二保";
							break
						case "ebm":
							pTypeName = "目标月二保";
							break
						case "db":
							pTypeName = "定保";
							break
						case "sc":
							pTypeName = "手册";
							break
						case "xbx":
							pTypeName = "新保续";
							break
						case "xubx":
							pTypeName = "续保续";
							break
						case "hy":
							pTypeName = "活跃";
							break
						case "fhy":
							pTypeName = "非活跃";
							break
						case "zls":
							pTypeName = "准流失";
							break
						case "yls":
							pTypeName = "已流失";
							break
						case "sr":
							pTypeName = "生日";
							break
						case "ns":
							pTypeName = "年审";
							break
						case "yb":
							pTypeName = "延保";
							break
						case "rc":
							pTypeName = "日常";
							break
						case "hd":
							pTypeName = "活动";
							break
						case "zdyrw":
							pTypeName = "自定义任务";
							break
						default:
							break
					}
					if(value != '') {
						//追加主题
						this.$data.concatForm.title = this.$data.concatForm.title.split("-")[0] + "-" + pTypeName;
					}
				}

			},
			/*********************完成任务*******************/
			saveConcat: function() {
				this.$refs.concatForm.validate(function(valid) {
					if(valid) {
						if(this.$data.concatForm.expectDate != '' && this.$data.concatForm.expectContent == '') {
							this.$message.error("请填写提醒内容！")
						} else {
							if(this.$data.concatForm.maintainTime) {
								this.$data.concatForm.maintainTime = new Date(this.$data.concatForm.maintainTime).getTime();
							}
							if(this.$data.concatForm.expectDate) {
								this.$data.concatForm.expectDate = this.moment(this.$data.concatForm.expectDate).format("YYYY-MM-DD");
							}
							this.$data.fullscreenLoadings = true;
							this.$http({
								method: 'POST',
								url: this.API_ROOT + '/crm/contact/save',
								body: this.$data.concatForm,
							}).then(function(resp) {
								//this.queryTaskGrid();
								debugger;
								this.$data.concatShow = false;
								this.$data.fullscreenLoadings = false;
								//this.$emit('refresh');

							}, function(error) {
								// error
							})
						}
					}
					return false;
				}.bind(this));
				//			if(this.$data.concatForm.content ==''){
				//				this.$message.error("请填写内容记录！")
				//			}else if(this.$data.concatForm.expectDate !=''&&this.$data.concatForm.expectContent==''){
				//				this.$message.error("请填写提醒内容！")
				//			}else{
				//				if (this.$data.concatForm.maintainTime) {
				//				this.$data.concatForm.maintainTime = new Date(this.$data.concatForm.maintainTime).getTime();
				//			}
				//			if (this.$data.concatForm.expectDate) {
				//				this.$data.concatForm.expectDate = this.moment(this.$data.concatForm.expectDate).format("YYYY-MM-DD");
				//			}
				//			this.$http({
				//				method: 'POST',
				//				url: this.API_ROOT + '/crm/contact/save',
				//				body: this.$data.concatForm,
				//			}).then(function (resp) {
				//				//this.queryTaskGrid();
				//				debugger;
				//				this.$data.concatShow = false;
				//				//this.$emit('refresh');
				//
				//			}, function (error) {
				//				// error
				//			})
				//			}

			},
			//呼叫车主手机号
			callOwner: function() {
				//alert(this.$data.tableData.CarInfo.dataList[0].ownerTel);
				//debugger;
				this.call(this.$data.concatForm.carownerTel);
			},
			//加0呼叫车主手机号
			callOwner1: function() {
				//alert(this.$data.tableData.CarInfo.dataList[0].ownerTel);
				//debugger;
				var phone = "0" + this.$data.concatForm.carownerTel;
				this.call(phone);
			},
			//加00呼叫车主电话号
			callOwner2: function() {
				var phone = "00" + this.$data.concatForm.carownerTel;
				this.call(phone);
			},
			//点击手动拨号
			inputForm: function() {
				this.$data.callFormShow = true;
				this.$data.telephoneInput = '';
			},
			//手动拨号
			callInput: function() {
				//alert("343");
				debugger;
				if(this.$data.telephoneInput == '') {
					this.$message.error("请输入要拨打的电话！");
				} else {
					var phone = "0" + this.$data.telephoneInput;
					this.$data.callFormShow = false;
					this.call(this.$data.telephoneInput);

				}
			},
			//正常呼叫联系人手机号
			callLink: function(index) {
				//alert("343");
				this.call(this.$data.concatForm.senderTel);
			},
			//加0呼叫联系人手机号
			callLink1: function(index) {
				//alert("343");
				var phone = "0" + this.$data.concatForm.senderTel;
				this.call(phone);
			},
			//加00呼叫联系人电话号
			callLink2: function(index) {
				var phone = "00" + this.$data.concatForm.senderTel;
				this.call(phone);
			},
			//正常呼叫联系人手机号
			callHisLink: function(index) {
				//alert("343");
				this.call(this.$data.tableData[index].senderTel);
			},
			//加0呼叫联系人手机号
			callHisLink1: function(index) {
				//alert("343");
				var phone = "0" + this.$data.tableData[index].senderTel;
				this.call(phone);
			},
			//加00呼叫联系人电话号
			callHisLink2: function(index) {
				var phone = "00" + this.$data.tableData[index].senderTel;
				this.call(phone);
			},
			//呼出电话
			call: function(telephone) {
				//this.$data.telephone=telephone;
				//alert(telephone);
				//计时开始
				this.timerStart();
				//完成按钮禁用状态
				this.$data.overShow = true;
				//挂机按钮可通话计时显示
				this.$data.handShow = true;
				//挂机按钮禁用状态
				this.$data.handButtonShow = false,
					this.$data.startDate = new Date();
				this.$data.startDate = new Date(this.$data.startDate).getTime();
				var UsbPhone = document.getElementById("UsbPhone");
				//alert("eeee");
				var lAudioDeviceID = 0;
				//callFormShow=true;
				window.localStorage.setItem("u800", telephone);
				debugger;
				UsbPhone.Dial(lAudioDeviceID, telephone);
				//创建录音
				var RFile = "D:\\u80\\" + telephone + "_" + Number(new Date) + ".wav";
				this.$data.concatForm.recordPath = RFile;
				UsbPhone.StartRecordFile(lAudioDeviceID, RFile, 1);

			},
			//挂断电话
			hand: function() {
				//计时结束
				this.timerStop();
				//完成按钮禁用状态
				this.$data.overShow = false;
				//挂机按钮禁用状态
				this.$data.handButtonShow = true;
				this.$data.stopDate = new Date();
				this.$data.stopDate = new Date(this.$data.stopDate).getTime();
				this.$data.concatForm.recordLength = (this.$data.stopDate - this.$data.startDate) / 1000;
				this.$data.startDate = '';
				var UsbPhone = document.getElementById("UsbPhone");
				//alert("eeee");
				var lAudioDeviceID = 0;

				//callFormShow=true;
				var rese = UsbPhone.OnHand(lAudioDeviceID);
				if(rese != 0) {
					alert("挂机成功！")
				} else {
					alert("挂机错误！");
				}

			},
			//通话时长计时器
			//计时开始
			timerStart: function() {
				debugger;
				this.$data.int = window.setInterval(this.timer, 100);
			},
			//计时
			timer: function() {
				debugger;
				this.$data.millisecond = this.$data.millisecond + 100;
				if(this.$data.millisecond >= 1000) {
					this.$data.millisecond = 0;
					this.$data.second = this.$data.second + 1;
				}
				if(this.$data.second >= 60) {
					this.$data.second = 0;
					this.$data.minute = this.$data.minute + 1;
				}

				if(this.$data.minute >= 60) {
					this.$data.minute = 0;
					this.$data.hour = this.$data.hour + 1;
				}
				this.$data.timerData = this.$data.hour + "时" + this.$data.minute + "分" + this.$data.second + "秒";
			},
			//计时结束
			timerStop: function() {
				debugger;
				this.$data.hour = 0; //时
				this.$data.minute = 0; //分
				this.$data.second = 0; // 秒
				this.$data.millisecond = 0; //毫秒
				//				this.$data.timerData = '0时0分0秒'
				window.clearInterval(this.$data.int);
			},
			//定保计算器
			dbfunction: function() {
				this.$data.calculate.maintainMile = '5000';
				this.$data.issbtype = true;
				this.$data.calculate.nowMile = '';
				this.$data.db.expectDate = '';
				this.$http({
					method: "GET",
					url: this.API_ROOT + '/crm/car/taskCarInfo',
					params: {
						vin: this.$data.concatForm.vin,
						taskType: this.$data.typeCode
					}
				}).then(function(resp) {
					debugger;
					this.$data.calculate.dbresp = resp.data.data;

				}, function(error) {
					//error
				})
			},
			//当前里程值失去焦点处罚
			nowMileChange: function() {
				this.$http.post(this.API_ROOT + '/crm/task/createSbAndDbTask', this.$data.calculate)
					.then(function(resp) {
						this.$data.db.expectDate = null;

						debugger;
						if(resp.data.msg) {
							this.$message(resp.data.msg);
						}
						this.$data.db.expectDate = resp.data.data.expectDate;
					}, function(error) {
						//error
						//				this.$message.error(resp.data.msg);
					})
			},
			//生成定保任务
			cretedbtask: function() {
				this.$http.post(this.API_ROOT + '/crm/task/saveSbAndDbTask', this.$data.calculate)
					.then(function(resp) {
						this.$data.db.expectDate = null;
						debugger;
						if(resp.data.msg) {
							this.$message(resp.data.msg);
						}
						this.$data.db.expectDate = resp.data.data.expectDate;
						this.$data.issbtype = false;
					}, function(error) {
						//error
						this.$message.error(resp.data.msg);
					})
			},
			addConcat: function() {
				debugger;
				this.$data.activeName2 = "first";
				this.$data.selectStatus = "";
				var data;
				if(this.rowData instanceof Array) {
					data = this.rowData.length > 0 ? this.rowData[0] : {};
					this.$data.rowData1 = this.rowData.length > 0 ? this.rowData[0] : {};
				} else {
					data = this.rowData;
					this.$data.rowData1 = this.rowData;
				}
				this.$data.carData = data;
				this.$data.concatForm = Object.assign(this.$data.concatForm, this.$data.emptyConcatForm);
				this.$data.wxDialogTitle = (data.content == undefined || data.content == null || data.content == "") ? "新增维系[" + data.plateNum + "]" : data.content;
				//this.$data.concatForm.taskId = data.id;
				this.$data.concatForm.plateNum = data.plateNum;
				this.$data.concatForm.expectContent = this.$data.wxDialogTitle;
				this.$data.concatForm.vin = data.vin;
				this.$data.calculate.vin = data.vin;
				this.$data.concatForm.carId = data.carId == undefined ? data.id : data.carId;
				this.$data.concatForm.userTag = [];
				this.$data.parentId = [];

				this.$data.typeCode = data.typeCode;
				debugger;
				if(this.$data.typeCode) {
					this.$data.typeCodeS = this.$data.typeCode.substring(0, 2)
				}

				this.$data.calculate.typeCode = data.typeCode;
				//获取用户的维系历史
				this.$data.hisConcatShow = true;
				this.getLink(data.vin, data.plateNum);
				this.$data.concatShow = true;
				//this.queryConcatGrid();
				this.queryWork();
				this.twoQuery();
				this.queryOwnerTag();
			},
			queryWork: function() {
				this.$http({
					method: "GET",
					url: this.API_ROOT + '/crm/workorder/work',
					params: {
						carId: this.$data.concatForm.carId,
						vin: this.$data.concatForm.vin
					}
				}).then(function(resp) {
					//success
					debugger;
					this.$data.work = resp.data;
				}, function(error) {
					//error
				})
			},
			twoQuery: function() {
				debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + '/insurance/task/laetlyQuotation',
					params: {
						vin: this.rowData1.vin,
					}
				}).then(function(resp) {
					//success
					debugger;
					if(resp.data.data[0] == null) {
						var msg = {
							compulsoryTotal: '',
							commercialinsuranceTotal: '',
							insuranceStartDate: '',
							insureType: '',
						};
						this.$data.quotation[0] = msg;
						this.$data.changeprice = false;
						//						this.$data.quotation[0].compulsoryTotal = "";
						//						this.$data.quotation[0].commercialinsuranceTotal = "";
						//						this.$data.quotation[0].insuranceStartDate = "";
						//						this.$data.quotation[0].insureType = "";
					} else {
						debugger;
						this.$data.quotation = resp.data.data;
						this.$data.editcompany = resp.data.data[0].insuranceCompanyId;
						if(this.$data.quotation.length != 0) {
							if(this.$data.quotation[0].insureType == "sb") {
								this.$data.quotation[0].insureType = "新保";
							} else if(this.$data.quotation[0].insureType == "xb") {
								this.$data.quotation[0].insureType = "续保";
							} else {
								this.$data.quotation[0].insureType = "";
							};
							this.$data.quotation[0].insuranceStartDate = moment(this.$data.quotation[0].insuranceStartDate).format("YYYY-MM-DD");
							//						this.$data.id = this.$data.work.quotation[0].id;
							//							this.$data.laetlyQuotation = this.$data.quotation[0];

							this.$data.changeprice = true;
						}
					}

				}, function(error) {
					//error
				})
			},
			/***************维系记录获取联系人↓****************/
			getLink: function(vin, plateNum) {
				debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + '/crm/car/carInfo',
					params: {
						vin: vin,
						plateNum: plateNum,
					}
				}).then(function(resp) {
					debugger;

					this.$data.concatForm.senderTel = resp.data.senderTel;
					this.$data.concatForm.sender = resp.data.manitainSender;

					this.$data.concatForm.ownerName = resp.data.carownername;
					//				if (resp.data.ownerPhone) {
					//					this.$data.concatForm.ownerPhone = resp.data.ownerPhone;
					//				} else if (resp.data.carownerTel) {
					this.$data.concatForm.carownerTel = resp.data.carownerTel;
					//				}
					this.$data.concatForm.vin = resp.data.vin;
					this.$data.concatForm.series = resp.data.series;
					this.$data.concatForm.configure = resp.data.configure;
				}, function(error) {
					//error
				})
			},
			/*************点开任务后，获取用户标签**********/
			queryOwnerTag: function() {
				this.$data.tagListsShow = false;
				//debugger;
				this.$http({
					method: "GET",
					url: this.API_ROOT + '/crm/contact/UserTag',
					params: {
						vin: this.$data.concatForm.vin, //'LSGJS52U84S193556'//
					}
				}).then(function(resp) {
					//success
					//debugger;
					this.$data.concatForm.userTag = resp.data;

					this.$data.tagListsShow = true;
				}, function(error) {
					//error
				})
			},
			//新增报价单界面显示
			addQuotation: function() {
				this.$data.insuranceStartDate = ""; //初始化投保开始日期
				this.$data.insuranceCompanyId = ""; //初始化保险公司
				var vin = this.$data.rowData1.vin;
				var id = "";
				if(this.$data.selectStatus == "edit") {
					this.$confirm('此操作将清空修改报价单的信息！', '提示', {
						confirmButtonText: '确定',
						cancelButtonText: '取消',
						type: 'warning'
					}).then(() => {
						this.$data.selectStatus = "add";
						this.$data.activeName2 = "second";
						for(var j = 0; j < this.$data.intem.length; j++) {
							this.$data.intem[j].starts = false;
							this.$data.intem[j].limit = "";
							this.$data.intem[j].price = "";
						};
						this.query(vin, id);
					}).catch(() => {
						this.$message({
							type: 'info',
							message: '已取消此操作'
						});
					});
				} else {
					this.$data.selectStatus = "add";
					this.$data.activeName2 = "second";
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					};
					this.query(vin, id);

				}

			},
			lastMessage: function(type) {
				//debugger;
				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/QuotationItemList/lately', {
					params: {
						carId: this.rowData1.carId,
						key: type
					}
				}).then((response) => {
					debugger;
					var respData = response.data
					for(var i = 0; i < respData.length; i++) {
						for(var j = 0; j < this.$data.intem.length; j++) {
							if(this.$data.intem[j].id == respData[i].itemId) {
								this.$data.intem[j].starts = true;
								this.$data.intem[j].limit = respData[i].itemLimit;
								this.$data.intem[j].price = respData[i].itemPrice;
								break;
							}
						}
					}
					this.sumPrice();
					this.$data.auditShow = false;
				}, (response) => {
					debugger;
				});
			},
			//获取更多报价单
			getMoreQuotation: function() {
				debugger
				var data = {};
				data.companyId = window.localStorage.getItem("companyId");
				data.vin = this.rowData1.vin;
				this.$http({
					method: 'POST',
					url: this.API_ROOT + '/insurance/task/laetlyQuotation/more',
					params: {
						vin: data.vin,
						start: 1,
						limit: 25,
					}
				}).then(function(resp) {
					this.$data.moreQuotationShow = true;
					if(resp.data.success) {
						debugger;
						this.$data.insPriceData = resp.data.dataList;
					} else {

					}
				}, function(error) {})
			},
			//更多报价单界面保险类型解析
			insureTypeCov: function(row, column) {
				if(row.insureType == "sb") {
					return "新保";
				}
				if(row.insureType == "xb") {
					return "续保";
				}
			},
			//更多报价单界面修改按钮
			changePrice: function(index) {
				debugger;
				var vin = this.$data.insPriceData[index].vin;
				var id = this.$data.insPriceData[index].id;
				this.$data.editcompany = this.$data.insPriceData[index].insuranceCompanyId;
				if(this.$data.selectStatus == "add") {
					this.$confirm('此操作将清空新增报价单的信息！', '提示', {
						confirmButtonText: '确定',
						cancelButtonText: '取消',
						type: 'warning'
					}).then(() => {
						//清空保险项目
						for(var j = 0; j < this.$data.intem.length; j++) {
							this.$data.intem[j].starts = false;
							this.$data.intem[j].limit = "";
							this.$data.intem[j].price = "";
						};
						this.$data.selectStatus = "edit";
						this.$data.activeName2 = "third";
						this.$data.moreQuotationShow = false;
						this.query(vin, id);
					}).catch(() => {
						this.$message({
							type: 'info',
							message: '已取消此操作'
						});
					});
				} else {
					this.$data.selectStatus = "edit";
					this.$data.activeName2 = "third";
					//清空保险项目
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					};
					this.$data.moreQuotationShow = false;
					this.query(vin, id);
				}

			},
			//修改报价单界面显示
			editQuotation: function() {
				debugger;
				//任务维系界面点击修改按钮
				var vin = this.rowData1.vin;
				var id = this.$data.quotation[0].id;
				this.$data.editcompany = this.$data.quotation[0].insuranceCompanyId;
				if(this.$data.selectStatus == "add") {
					this.$confirm('此操作将清空新增报价单的信息！', '提示', {
						confirmButtonText: '确定',
						cancelButtonText: '取消',
						type: 'warning'
					}).then(() => {
						this.$data.selectStatus = "edit";
						this.$data.activeName2 = "third";
						for(var j = 0; j < this.$data.intem.length; j++) {
							this.$data.intem[j].starts = false;
							this.$data.intem[j].limit = "";
							this.$data.intem[j].price = "";
						};
						this.$data.moreQuotationShow = false;
						this.query(vin, id);
					}).catch(() => {
						this.$message({
							type: 'info',
							message: '已取消此操作'
						});
					});
				} else {
					this.$data.selectStatus = "edit";
					this.$data.activeName2 = "third";
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					};
					this.$data.moreQuotationShow = false;
					this.query(vin, id);
				}

			},
			//关闭窗口
			closeWindow: function() {
				this.concatShow = false;
			},
			/*******************关闭任务*******************************/

			closeConcat: function() {
				this.$confirm('确认要关闭这个任务吗?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.$data.int = '';
					this.$data.fullscreenLoadings = true;
					if(this.$data.concatForm.maintainTime) {
						this.$data.concatForm.maintainTime = new Date(this.$data.concatForm.maintainTime).getTime();
					}
					if(this.$data.concatForm.expectDate) {
						this.$data.concatForm.expectDate = this.moment(this.$data.concatForm.expectDate).format("YYYY-MM-DD");
					}
					this.$http({
						method: 'POST',
						url: this.API_ROOT + '/crm/contact/close',
						body: this.$data.concatForm,
					}).then(function(resp) {
						//this.queryTaskGrid();
						this.$data.concatShow = false;
						this.$data.fullscreenLoadings = false;
						//this.$emit('refresh');

					}, function(error) {
						// error
					})
				}).catch(() => {
					this.$message({
						type: 'info',
						message: '已取消此操作'
					});
				});
			},

			/***************维系记录获取联系人↑****************/
			countTime: function(val) {
				if(val == "" || val == null) return "";
				return moment(Number(val)).format("YYYY-MM-DD");
			},
			query: function(vin, id) {
				//新增报价单
				if(this.$data.selectStatus == "add") {
					this.$http({
						method: 'GET',
						url: this.API_ROOT + '/insurance/task/latelyInsurance', //url
						params: { //发送的参数
							vin: vin,
						}
					}).then(function(resp) {
						debugger;
						if(resp.data.data.orderDate && resp.data.data.orderEndDate) {

							this.$data.PstartDate = moment(resp.data.data.orderDate).format("YYYY-MM-DD");

							this.$data.PstopDate = moment(resp.data.data.orderEndDate).format("YYYY-MM-DD");
							this.$data.insuranceStartDate = moment(resp.data.data.orderEndDate).format("YYYY-MM-DD");
							//投保开始日期为上次投保结束日期后一天
							var newDate = new Date(this.$data.insuranceStartDate);
							this.$data.insuranceStartDate = newDate.setDate(newDate.getDate() + 1);
							//转换投保开始日期个数
							this.$data.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");
							this.$data.insuranceCompanyId = '';
							this.$data.bxcompany = resp.data.data.commercialCompany;
							//							this.$data.insuranceStartDate = moment()
						} else {
							this.$data.PstartDate = "";
							this.$data.PstopDate = "";
						}

					}, function(error) {
						// error
					});
					//请求车辆及客户信息系
					this.$http.get(this.API_ROOT + '/insurance/car/carInfo/vin', {
						params: {
							vin: vin
						}
					}).then((response) => {
						debugger;
						this.$data.infoData = Object.assign(this.$data.infoData, response.data.data);
						//被保险人类型若为"",默认为"0"：个人
						if(this.$data.infoData.source == "" || this.$data.infoData.source == null || this.$data.infoData.source == "null") {
							this.$data.infoData.source = "0";
						}
					}, (response) => {});
				} else if(this.$data.selectStatus == "edit") {
					//修改报价单
					//				this.$data.intem[0].starts=true;
					this.$http({
						method: 'GET',
						url: this.API_ROOT + '/insurance/task/latelyInsurance', //url
						params: { //发送的参数
							vin: vin,
						}
					}).then(function(resp) {
						debugger;
						if(resp.data.data.orderDate && resp.data.data.orderEndDate) {

							this.$data.PstartDate = moment(resp.data.data.orderDate).format("YYYY-MM-DD");

							this.$data.PstopDate = moment(resp.data.data.orderEndDate).format("YYYY-MM-DD");
							this.$data.insuranceStartDate = moment(resp.data.data.orderEndDate).format("YYYY-MM-DD");
							//投保开始日期为上次投保结束日期后一天
							var newDate = new Date(this.$data.insuranceStartDate);
							this.$data.insuranceStartDate = newDate.setDate(newDate.getDate() + 1);
							//转换投保开始日期个数
							this.$data.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");

							this.$data.bxcompany = resp.data.data.commercialCompany;
							//							this.$data.insuranceStartDate = moment()
						} else {
							this.$data.PstartDate = "";
							this.$data.PstopDate = "";
						}
						this.$data.insuranceCompanyId = this.$data.editcompany;

					}, function(error) {
						// error
					});
					this.intemInfo(id); //请求已经选中的报价单项目
					//请求车辆及客户信息系
					this.$http.get(this.API_ROOT + '/insurance/car/carInfo/vin', {
						params: {
							vin: vin
						}
					}).then((response) => {
						debugger;
						this.$data.infoData = Object.assign(this.$data.infoData, response.data.data);
						//被保险人类型若为"",默认为"0"：个人
						if(this.$data.infoData.source == "" || this.$data.infoData.source == null || this.$data.infoData.source == "null") {
							this.$data.infoData.source = "0";
						}
						//this.$data.orderFromData.payPeople = response.data.data.insured;
					}, (response) => {
						debugger;
					});
				}

			},
			//请求已经选中的报价单项目
			intemInfo: function(id) {
				//debugger;
				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
					params: {
						id: id
					}
				}).then((response) => {
					debugger;
					for(var j = 0; j < this.$data.intem.length; j++) {
						this.$data.intem[j].starts = false;
						this.$data.intem[j].limit = "";
						this.$data.intem[j].price = "";
					}

					var respData = response.data
					for(var i = 0; i < respData.length; i++) {
						for(var j = 0; j < this.$data.intem.length; j++) {
							if(this.$data.intem[j].id == respData[i].itemId) {
								this.$data.intem[j].starts = true;
								this.$data.intem[j].limit = respData[i].itemLimit;
								this.$data.intem[j].price = respData[i].itemPrice;
								break;
							}

						}
					}
					this.sumPrice();
				}, (response) => {
					debugger;
				});
			},
			//查询报价单项目sy商业
			itmeQuerySy: function() {
				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
					params: {
						type: 1,
						id: this.rowData1.id
					}
				}).then((response) => {
					debugger;
					this.$data.tableDatasy.dataList = response.data;
				}, (response) => {
					debugger;
				});

			},
			//			//查询报价单项目jq交强
			//			itmeQueryJq: function() {
			//				this.$http.get(this.API_ROOT + '/insurance/QuotationItem/hasQuotationList', {
			//					params: {
			//						type: 0,
			//						id: this.$data.$data.laetlyQuotation.id
			//					}
			//				}).then((response) => {
			//					debugger;
			//					this.$data.tableDatajq.dataList = response.data;
			//				}, (response) => {
			//					debugger;
			//				});
			//			},

			//报价单方法开始
			//↓↓↓
			//计算价格
			sumPrice: function() {
				//				compulsoryTotal 交强 险总价
				//              commercialinsuranceTotal 商业险总价
				//总价格
				debugger;
				var sumPrice = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true && this.$data.intem[i].price != "") {
						this.$data.intem[i].price = Number(this.$data.intem[i].price);
						//						if(i == 0) {
						//							debugger;
						//							//							this.$data.intem[17].starts = true;
						//							sumPrice = sumPrice + (this.$data.intem[i].price);
						//						} else if(i == 2) {
						//							debugger;
						//							sumPrice = sumPrice + this.$data.intem[i].price;
						//						} else if(i == 4) {
						//							debugger;
						//							this.$data.intem[16].starts = true;
						//							sumPrice = sumPrice + (this.$data.intem[i].price);
						//						} else {
						//							debugger;
						sumPrice = sumPrice + this.$data.intem[i].price;
						//						}
					}
				}
				debugger;
				if(this.$data.intem[0].starts == true) {
					this.$data.ccsjg = Number(this.$data.intem[0].price).toFixed(2);
				} else {
					this.$data.ccsjg = 0;
				}
				if(this.$data.intem[1].starts == true) {
					this.$data.jqxbj = Number(this.$data.intem[1].price).toFixed(2);
				} else {
					this.$data.jqxbj = 0;
				}
				this.$data.syxbj = Number(sumPrice - this.$data.jqxbj - this.$data.ccsjg).toFixed(2);
				this.$data.sum = Number(Number(this.$data.jqxbj) + Number(this.$data.syxbj) + Number(this.$data.ccsjg)).toFixed(2);
				//this.$data.orderFromData.commercialinsurancePrice = Number(this.$data.syxbj).toFixed(2); //商业
				//this.$data.orderFromData.compulsoryPrice = Number(this.$data.jqxbj).toFixed(2); //交强
				this.$data.infoData.commercialinsuranceTotal = Number(this.$data.syxbj).toFixed(2); //update的时候
				this.$data.infoData.compulsoryTotal = Number(Number(this.$data.jqxbj) + Number(this.$data.ccsjg)).toFixed(2);
			},
			//三者，车上保额赋给不计免赔
			quotaChange: function(num) {
				if(num == "4") {
					this.$data.intem[5].limit = this.$data.intem[4].limit;
				} else if(num == "8") {
					this.$data.intem[10].limit = this.$data.intem[8].limit;
				} else if(num == "9") {
					this.$data.intem[11].limit = this.$data.intem[9].limit;
				}
			},
			//打开搜索的车型选择
			chooseSearchModel: function() {
				this.$data.searchCarShow = true;
			},
			//资源过滤
			filterNode: function(value, data, node) {
				if(!value) return true;
				return data.label.indexOf(value) !== -1;
			},
			//点击搜索的资源树节点
			searchNodeClick: function(data) {
				debugger;
				//				this.$data.infoData.carValue = '';
				//				this.$data.infoData.carLevel = '';
				//				
				this.$data.searhcarType = data.type;
				this.$data.searchdatalabel = data.label;
				this.$data.searchdatavale = data.value;
				this.$data.searchdataNumber = data.number;
				//				this.$data.infoData.carLevel = data.type;
				//				this.$data.infoData.carValue = data.value;
			},
			//搜索确认车型
			serchSaveCar: function() {
				debugger;
				if(this.$data.searhcarType == 0) {
					this.$message.error("请不要选择品牌！");
				} else {
					this.$data.infoData.carLevel = this.$data.searhcarType;
					this.$data.infoData.carValue = this.$data.searchdatavale;
					this.$data.infoData.carModel = this.$data.searchdatalabel;
					this.$data.infoData.label = this.$data.searchdataNumber
					this.$data.searchCarShow = false;
				}
			},
			comFormShowsClose: function() {
				this.$confirm('此操作将不会保存输入的数据, 是否继续?', '提示', {
					confirmButtonText: '确定',
					cancelButtonText: '取消',
					type: 'warning'
				}).then(() => {
					this.$data.activeName2 = 'first';
					this.$data.selectStatus = '';
					this.$data.concatForm.content = "";
				}).catch(() => {

				});
			},
			//点击请求单
			qqClick: function() {
				debugger;
				var itemsNames = "";
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsNames += this.$data.intem[i].name + "，";
						} else if(i == 4 || i == 5) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "元，";
						} else if(i == 8 || i == 9 || i == 10 || i == 11) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "万";
						} else {
							itemsNames += this.$data.intem[i].name + "，";
						}
					}
				}
				this.$data.qqFromData.qqText = "车牌号为" + this.$data.infoData.plateNum + ",车架号为" + this.$data.infoData.vin + "的车辆投保,项目包括" + itemsNames + "请给予报价。"
				this.$data.qqShow = true;
			},
			//复制请求单
			copyQQ: function() {
				debugger;
				var copyText = this.$data.qqFromData.qqText;
				copy(copyText);
				//copy("copyText");
				//copyText.execCommand("copy");
			},
			//点击响应单
			xyClick: function() {
				//debugger;
				//响应单的内容组合
				var itemsNames = "";
				//总价格
				//var sumPrice=0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true) {
						if(i == 2) {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + ");";
						} else if(i == 4 || i == 5) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "元，保险费：" + this.$data.intem[i].price + "元；";
						} else if(i == 8 || i == 9 || i == 10 || i == 11) {
							itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "万，保险费：" + this.$data.intem[i].price + "元；";
						} else {
							itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
						}
					}
				};
				//调用价格计算
				this.sumPrice();
				debugger;
				this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
					"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) + "，车船税价格：￥" + parseFloat(this.$data.ccsjg) +
					"，合计：￥" + (parseFloat(this.$data.jqxbj) + parseFloat(this.$data.syxbj) + parseFloat(this.$data.ccsjg));
				this.$data.xyShow = true;
			},
			//确认价格之后再保存。
			comFormShowsSure: function() {
				if(this.$data.insuranceStartDate == '') {
					this.$message.error("请选择投保开始日期");
				} else if(this.$data.insuranceCompanyId == '') {
					this.$message.error("请选择保险公司");
				} else if(this.$data.infoData.source == '0' && this.isCardNo(this.$data.infoData.insuredIdNumber) == false) {
					this.$message.error("请填写正确的身份证号");
				} else {
					this.$refs.comForm.validate(function(valid, $event) {
						// 验证通过
						if(valid) {
							debugger;
							var sum = 0;
							for(var i = 0; i < this.$data.intem.length; i++) {
								//勾选保险项目未填写保费时
								if(this.$data.intem[i].starts == true && this.$data.intem[i].price == "") {
									this.$message.error(this.$data.intem[i].name + "未填写保费!");
									return false;
								};
								//三者保额验证
								if(i == 4 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
									this.$message.error(this.$data.intem[i].name + "未填写保额!");
									return false;
								}
								//车上司机保额验证
								if(i == 8 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
									this.$message.error(this.$data.intem[i].name + "未填写保额!");
									return false;
								}
								//车上乘客保额验证
								if(i == 9 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
									this.$message.error(this.$data.intem[i].name + "未填写保额!");
									return false;
								}
								if(this.$data.intem[i].starts == false) {
									sum = sum + 0;
								} else {
									sum = sum + 1;
								}

							}
							if(sum == 0) {
								this.$message.error("请至少选择一条保险项目,并且填写保费");
								return false;
							} else {
								this.sureShow = true;
								this.saveCusInfo(); //保存车主以及车辆信息
							}
						} else {
							this.$message.error("请完善客户信息！");
							return false
						}
					}.bind(this))
				}
			},
			//身份验证
			isCardNo: function(card) {
				debugger;
				// 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X  
				var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x|Y|y|)$)/;
				if(reg.test(card) === false) {
					return false;
				} else {
					return true;
				}
			},
			//保存报价单（点保存的时候要询问是否出单）
			saveEdit: function() {
				debugger;
				this.$data.fullscreenLoading = true;
				this.$data.infoData.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");
				//				this.$data.infoData.insuranceStopDate = moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
				//items
				this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
				//this.saveCusInfo(); //保存车主以及车辆信息
				//insuranceCar
				this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
				this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.insuredAddress;
				this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.insuredIdNumber;
				this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
				this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
				this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
				this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
				this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
				this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
				this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
				this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
				this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
				this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
				this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
				this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
				this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
				this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
				//paramQuotation
				this.$data.TXMsg.paramQuotation.carId = this.rowData1.carId;
				if(this.$data.selectStatus == "add") {
					this.$data.TXMsg.paramQuotation.id = "";
				} else {
					this.$data.TXMsg.paramQuotation.id = this.$data.quotation[0].id;
				}
				this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
				this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
				this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
				this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
				this.$data.TXMsg.paramQuotation.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");
				this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;
				var syPrice = Number(this.$data.syxbj).toFixed(2);
				this.sureShow = false; //	if(this.saveItems()) {
				if(syPrice == 0) {
					this.$http.post(this.API_ROOT + '/insurance/task/save', this.$data.TXMsg, { //更新报价单
						params: {
							taskId: this.rowData1.id
						}
					}).then(resp => {
						this.$data.fullscreenLoading = false;
						if(resp.data.success) {
							//								this.$data.comFormShows = false;
							//debugger;
							//响应单的内容组合
							var itemsNames = "";
							//总价格
							//var sumPrice=0;
							debugger;
							for(var i = 0; i < this.$data.intem.length; i++) {
								if(this.$data.intem[i].starts == true) {
									if(i == 2) {
										itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + ");";
									} else if(i == 4 || i == 5) {
										itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "元，保险费：" + this.$data.intem[i].price + "元；";
									} else if(i == 8 || i == 9 || i == 10 || i == 11) {
										itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "万，保险费：" + this.$data.intem[i].price + "元；";
									} else {
										itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
									}
								}
							};
							//调用价格计算
							this.sumPrice();
							debugger;
							this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
								"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) + "，车船税价格：￥" + parseFloat(this.$data.ccsjg) +
								"，合计：￥" + (parseFloat(this.$data.sum))
							this.$data.contentMsg = this.$data.xyFromData.xyText;
							this.$data.concatForm.content = this.$data.xyFromData.xyText;
							//this.yujingSave();
							this.$data.selectStatus = "";
							this.$data.activeName2 = "first";
							this.twoQuery();
						} else {
							this.$message.error(resp.data.msg);
						}
					}, resp => {});
				} else {
					//报价检测
					//					this.$http.get(this.API_ROOT + '/insurance/Quotation/checkWarning', {
					//						params: {
					//							carId: this.rowData1.carId,
					//							syPrice: syPrice,
					//						}
					//					}).then(resp => {
					//						debugger;

					//						if(resp.data.success) {
					this.$http.post(this.API_ROOT + '/insurance/task/save', this.$data.TXMsg, { //更新报价单
						params: {
							taskId: this.rowData1.id
						}
					}).then(resp => {
						this.$data.fullscreenLoading = false;
						if(resp.data.success) {
							//响应单的内容组合
							var itemsNames = "";
							//总价格
							//var sumPrice=0;
							debugger;
							for(var i = 0; i < this.$data.intem.length; i++) {
								if(this.$data.intem[i].starts == true) {
									if(i == 2) {
										itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + ");";
									} else if(i == 4 || i == 5) {
										itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "元，保险费：" + this.$data.intem[i].price + "元；";
									} else if(i == 8 || i == 9 || i == 10 || i == 11) {
										itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "万，保险费：" + this.$data.intem[i].price + "元；";
									} else {
										itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
									}
								}
							};
							//调用价格计算
							this.sumPrice();
							debugger;
							this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
								"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) + "，车船税价格：￥" + parseFloat(this.$data.ccsjg) +
								"，合计：￥" + (parseFloat(this.$data.sum))
							this.$data.contentMsg = this.$data.xyFromData.xyText;
							this.$data.concatForm.content = this.$data.xyFromData.xyText;
							//this.yujingSave();
							this.$data.selectStatus = "";
							this.$data.activeName2 = "first";
							this.twoQuery();
						} else {
							this.$message.error(resp.data.msg);
						}
					}, resp => {});

					//						this.$confirm('要出单吗?', '提示', { //出单询问
					//							confirmButtonText: '确定',
					//							cancelButtonText: '取消',
					//							type: 'warning'
					//						}).then(() => {
					//							this.outOrderfun(this.$data.$data.laetlyQuotation.qid, this.$data.$data.laetlyQuotation.id); //出单函数
					//						}).catch(() => {
					//							this.$message({
					//								type: 'info',
					//								message: '取消出单'
					//							});
					//						});
					//						} else {
					//							this.$data.yujingShow = true;
					//							this.$data.yujingMsg = resp.data.msg;
					//						}
					//					}, resp => {});
				}
				//				}

			},
			//保存保险项目
			saveItems: function() {

				var items = [];
				var y = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					debugger;
					//勾选保险项目未填写保费时
					if(this.$data.intem[i].starts == true && this.$data.intem[i].price == "") {
						this.$message.error(this.$data.intem[i].name + "未填写保费!");
						return false;
					};
					//三者保额验证
					if(i == 4 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					//车上司机保额验证
					if(i == 8 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					//车上乘客保额验证
					if(i == 9 && this.$data.intem[i].starts == true && this.$data.intem[i].limit == "") {
						this.$message.error(this.$data.intem[i].name + "未填写保额!");
						return false;
					}
					if(this.$data.intem[i].starts == true && this.$data.intem[i].price != "") {
						items[y] = this.$data.intem[i];
						y++;
						//						}
					}
				};
				return items;
			},
			//保存报价单维护客户以及车辆信息
			saveCusInfo: function() {
				this.$http.post(this.API_ROOT + '/insurance/car/save', this.$data.infoData)
					.then(resp => {
						debugger;
						if(resp.data.success) {
							//							this.$message(resp.data.msg);
						} else {
							this.$message.error(resp.data.msg);
						}
					}, resp => {

					});
			},
			yujingSave: function() {
				this.$data.fullscreenLoading = true;
				this.$data.infoData.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");
				this.$data.insuranceStartDate = moment(this.$data.insuranceStartDate).format("YYYY-MM-DD");
				//				this.$data.infoData.insuranceStopDate = moment(this.$data.infoData.insuranceStopDate).format("YYYY-MM-DD");
				//items
				this.$data.TXMsg.itemList = this.saveItems(); //保存保险项目
				//this.saveCusInfo(); //保存车主以及车辆信息
				//insuranceCar
				this.$data.TXMsg.insuranceCar.insured = this.$data.infoData.insured;
				this.$data.TXMsg.insuranceCar.InsuredAddress = this.$data.infoData.insuredAddress;
				this.$data.TXMsg.insuranceCar.InsuredIdNumber = this.$data.infoData.insuredIdNumber;
				this.$data.TXMsg.insuranceCar.postCode = this.$data.infoData.postCode;
				this.$data.TXMsg.insuranceCar.contactName = this.$data.infoData.contactName;
				this.$data.TXMsg.insuranceCar.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.insuranceCar.email = this.$data.infoData.email;
				this.$data.TXMsg.insuranceCar.plateNum = this.$data.infoData.plateNum;
				this.$data.TXMsg.insuranceCar.carValue = this.$data.infoData.carValue;
				this.$data.TXMsg.insuranceCar.carLevel = this.$data.infoData.carLevel;
				this.$data.TXMsg.insuranceCar.engineNum = this.$data.infoData.engineNum;
				this.$data.TXMsg.insuranceCar.vin = this.$data.infoData.vin;
				this.$data.TXMsg.insuranceCar.power = this.$data.infoData.power;
				this.$data.TXMsg.insuranceCar.passengerWeight = this.$data.infoData.passengerWeight;
				this.$data.TXMsg.insuranceCar.useProperty = this.$data.infoData.useProperty;
				this.$data.TXMsg.insuranceCar.driverLicense = this.$data.infoData.driverLicense;
				this.$data.TXMsg.insuranceCar.firstRecordDate = this.$data.infoData.firstRecordDate;
				this.$data.TXMsg.insuranceCar.realValue = this.$data.infoData.realValue;
				//paramQuotation
				this.$data.TXMsg.paramQuotation.carId = this.rowData1.carId;
				if(this.$data.selectStatus == "add") {
					this.$data.TXMsg.paramQuotation.id = "";
				} else {
					this.$data.TXMsg.paramQuotation.id = this.$data.quotation[0].id;
				}
				this.$data.TXMsg.paramQuotation.commercialinsuranceTotal = this.$data.infoData.commercialinsuranceTotal;
				this.$data.TXMsg.paramQuotation.compulsoryTotal = this.$data.infoData.compulsoryTotal;
				this.$data.TXMsg.paramQuotation.contactPeople = this.$data.infoData.contactPeople;
				this.$data.TXMsg.paramQuotation.contactPhone = this.$data.infoData.contactPhone;
				this.$data.TXMsg.paramQuotation.insuranceCompanyId = this.$data.insuranceCompanyId;
				this.$data.TXMsg.paramQuotation.insuranceStartDate = this.$data.insuranceStartDate;
				this.$data.TXMsg.paramQuotation.insureType = this.$data.insureType;

				this.$http.post(this.API_ROOT + '/insurance/task/save', this.$data.TXMsg, { //更新报价单
					params: {
						taskId: this.rowData1.id
					}
				}).then(resp => {
					debugger;
					if(resp.data.success) {
						this.$data.yujingShow = false;
						//						this.$data.comFormShows = false;
						//debugger;
						//响应单的内容组合
						var itemsNames = "";
						//总价格
						//var sumPrice=0;
						for(var i = 0; i < this.$data.intem.length; i++) {
							if(this.$data.intem[i].starts == true) {
								if(i == 2) {
									itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + ");";
								} else if(i == 4 || i == 5) {
									itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "元，保险费：" + this.$data.intem[i].price + "元；";
								} else if(i == 8 || i == 9 || i == 10 || i == 11) {
									itemsNames += this.$data.intem[i].name + "限额：" + this.$data.intem[i].limit + "万，保险费：" + this.$data.intem[i].price + "元；";
								} else {
									itemsNames += this.$data.intem[i].name + "(" + this.$data.intem[i].price + "),"
								}
							}
						};
						//调用价格计算
						this.sumPrice();
						debugger;
						this.$data.xyFromData.xyText = "尊敬的客户【" + this.$data.infoData.contactName + "】" +
							"您好,您的保险方案为:" + itemsNames + ";商业险价格：￥" + parseFloat(this.$data.syxbj) + "，交强险价格：￥" + parseFloat(this.$data.jqxbj) + "，车船税价格：￥" + parseFloat(this.$data.ccsjg) +
							"，合计：￥" + (parseFloat(this.$data.sum))
						this.$data.contentMsg = this.$data.xyFromData.xyText;
						this.$data.concatForm.content = this.$data.xyFromData.xyText;
						this.$data.selectStatus = "";
						this.$data.activeName2 = "first";
						this.twoQuery();
						this.$data.fullscreenLoading = false;
					} else {
						this.$message.error(resp.data.msg);
						this.$data.fullscreenLoading = false;
					}
				}, resp => {});
			},

			//查询搜索的参数树
			querySearchTree: function() {
				//获取资源树
				debugger;
				this.$http.get(this.API_ROOT + '/base/car/pages', {
					params: {
						type: '0'
					}
				}).then((response) => {
					this.$data.SearchTreeData = response.data;
				}, (response) => {});
			},
			//↑↑↑
			//报价单方法结束
		},
		//表单创建时执行
		created: function() {
			debugger;

			this.$data.changeHis = this.$data.changeHis + 1;
			if(this.rowData instanceof Array) {
				this.$data.emptyConcatForm.taskId = [];
				for(var i = 0; i < this.rowData.length; i++) {
					this.$data.emptyConcatForm.taskId.push(this.rowData[i].id);
				}
			} else {
				this.$data.emptyConcatForm.taskId = this.rowData.id;
			}
			this.$data.concatShow = false;
			this.$data.hisConcatShow = false;
			this.addConcat();
			//获取流失方向下拉
			this.$http.get(this.API_ROOT + '/crm/loss/lossList', {
				params: {
					typeCode: "2"
				}
			}).then((response) => {
				// success callback
				debugger;
				this.$data.missTargetCombo = response.data.data;
			}, (response) => {
				// error callback
			});
			//获取流失原因下拉
			this.$http.get(this.API_ROOT + '/crm/loss/lossList', {
				params: {
					typeCode: "1"
				}
			}).then((response) => {
				// success callback
				this.$data.missReasonCombo = response.data.data;
			}, (response) => {
				// error callback
			});
			//获取回访失败原因下拉
			this.$http.get(this.API_ROOT + '/crm/loss/lossList', {
				params: {
					typeCode: "3"
				}
			}).then((response) => {
				// success callback
				this.$data.failReasonCombo = response.data.data;
			}, (response) => {
				// error callback
			});
			this.querySearchTree();
			this.$http.get(this.API_ROOT + '/insurance/combo', {
				params: {}
			}).then((response) => {
				// success callback
				this.$data.companyCombo = response.data;
			}, (response) => {
				// error callback
			});
		},
		components: {
			tagLists,
			hisConcat,
			customer
		}
	}
</script>

<style>
	.rBtn {
		float: right;
		text-align: right
	}
</style>